summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/gets.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2005-05-28 04:34:05 +0000
committermillert <millert@openbsd.org>2005-05-28 04:34:05 +0000
commitfd14b462090ec42522658235a4979b806664be52 (patch)
treebe79bbefeee95fa22b5fe01d7a16a31c2b938503 /lib/libc/stdio/gets.c
parentHandle XS_SHORTSENSE error codes in ioctl situations. From NetBSD. (diff)
downloadwireguard-openbsd-fd14b462090ec42522658235a4979b806664be52.tar.xz
wireguard-openbsd-fd14b462090ec42522658235a4979b806664be52.zip
Use '\0' not 0 when storing as a char, part from Andrey Matveev.
Diffstat (limited to 'lib/libc/stdio/gets.c')
-rw-r--r--lib/libc/stdio/gets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c
index 4d6a83d0b12..341084c2ff1 100644
--- a/lib/libc/stdio/gets.c
+++ b/lib/libc/stdio/gets.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: gets.c,v 1.7 2004/09/28 18:12:44 otto Exp $";
+static char rcsid[] = "$OpenBSD: gets.c,v 1.8 2005/05/28 04:34:05 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@@ -53,6 +53,6 @@ gets(char *buf)
break;
else
*s++ = c;
- *s = 0;
+ *s = '\0';
return (buf);
}