aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio/ungetc.c
diff options
context:
space:
mode:
authorJames Raynard <jraynard@FreeBSD.org>1996-06-22 10:34:15 +0000
committerJames Raynard <jraynard@FreeBSD.org>1996-06-22 10:34:15 +0000
commitce51cf0392a0b2cc80e5ddcdb01394a303093443 (patch)
treedabe76e239303cbaa8026d6b9fa85fe1b5845601 /lib/libc/stdio/ungetc.c
parent55c148f316e1e2bbc7ac656d7f89144dd9dc34c0 (diff)
downloadsrc-ce51cf0392a0b2cc80e5ddcdb01394a303093443.tar.gz
src-ce51cf0392a0b2cc80e5ddcdb01394a303093443.zip
Notes
Diffstat (limited to 'lib/libc/stdio/ungetc.c')
-rw-r--r--lib/libc/stdio/ungetc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libc/stdio/ungetc.c b/lib/libc/stdio/ungetc.c
index 25f59d7420fb..c0355b7f6410 100644
--- a/lib/libc/stdio/ungetc.c
+++ b/lib/libc/stdio/ungetc.c
@@ -35,7 +35,11 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
static char sccsid[] = "@(#)ungetc.c 8.2 (Berkeley) 11/3/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@@ -47,6 +51,8 @@ static char sccsid[] = "@(#)ungetc.c 8.2 (Berkeley) 11/3/93";
#include "pthread_private.h"
#endif
+static int __submore __P((FILE *));
+
/*
* Expand the ungetc buffer `in place'. That is, adjust fp->_p when
* the buffer moves, so that it points the same distance from the end,
@@ -75,7 +81,7 @@ __submore(fp)
return (0);
}
i = fp->_ub._size;
- p = realloc(fp->_ub._base, i << 1);
+ p = realloc(fp->_ub._base, (size_t)(i << 1));
if (p == NULL)
return (EOF);
/* no overlap (hence can use memcpy) because we doubled the size */