diff options
author | tjr <tjr@FreeBSD.org> | 2003-01-30 12:00:26 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-01-30 12:00:26 +0000 |
commit | 72fe86c5197bbce8511d9527e303b62e0bff0fe2 (patch) | |
tree | a740b7e74d07514994336d0b6ccf613eafca51f7 | |
parent | ae21d4debd065e8062f8d8372c3f50ab8a9880c9 (diff) | |
download | FreeBSD-src-72fe86c5197bbce8511d9527e303b62e0bff0fe2.zip FreeBSD-src-72fe86c5197bbce8511d9527e303b62e0bff0fe2.tar.gz |
Remove runtime warning about gets().
-rw-r--r-- | lib/libc/stdio/gets.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c index e247271..08a6c3c 100644 --- a/lib/libc/stdio/gets.c +++ b/lib/libc/stdio/gets.c @@ -41,7 +41,6 @@ static char sccsid[] = "@(#)gets.c 8.1 (Berkeley) 6/4/93"; __FBSDID("$FreeBSD$"); #include "namespace.h" -#include <unistd.h> #include <stdio.h> #include <sys/cdefs.h> #include "un-namespace.h" @@ -56,16 +55,9 @@ gets(buf) { int c; char *s; - static int warned; - static char w[] = - "warning: this program uses gets(), which is unsafe.\n"; FLOCKFILE(stdin); ORIENT(stdin, -1); - if (!warned) { - (void) _write(STDERR_FILENO, w, sizeof(w) - 1); - warned = 1; - } for (s = buf; (c = __sgetc(stdin)) != '\n';) if (c == EOF) if (s == buf) { |