summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocf.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-09-16 03:16:06 +0000
committerimp <imp@FreeBSD.org>1998-09-16 03:16:06 +0000
commitf706ca01b7f767dba1bd3c3b1cc66f9ab11ac513 (patch)
tree6269826a40a9c4adc89a5f15870fe767c976fcd5 /lib/libc/stdlib/reallocf.c
parent7bf4199b5f595761cb8b9176aeee442f69b7545c (diff)
downloadFreeBSD-src-f706ca01b7f767dba1bd3c3b1cc66f9ab11ac513.zip
FreeBSD-src-f706ca01b7f767dba1bd3c3b1cc66f9ab11ac513.tar.gz
Fix style problems noted by Bruce:
o No copyright on reallocf. o Order makefile list correctly. o indent reallocf properly.
Diffstat (limited to 'lib/libc/stdlib/reallocf.c')
-rw-r--r--lib/libc/stdlib/reallocf.c37
1 files changed, 32 insertions, 5 deletions
diff --git a/lib/libc/stdlib/reallocf.c b/lib/libc/stdlib/reallocf.c
index 728acc9..6e27998 100644
--- a/lib/libc/stdlib/reallocf.c
+++ b/lib/libc/stdlib/reallocf.c
@@ -1,12 +1,39 @@
+/*-
+ * Copyright (c) 1998, M. Warner Losh <imp@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id:$
+ */
#include <stdlib.h>
void *
reallocf(void *ptr, size_t size)
{
- void *nptr;
+ void *nptr;
- nptr = realloc(ptr, size);
- if (!nptr && ptr)
- free(ptr);
- return (nptr);
+ nptr = realloc(ptr, size);
+ if (!nptr && ptr)
+ free(ptr);
+ return (nptr);
}
OpenPOWER on IntegriCloud