Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdio Don't use "NULL" to talk about null-terminate...



details:   https://anonhg.NetBSD.org/src/rev/fbf917ca41a9
branches:  trunk
changeset: 354241:fbf917ca41a9
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Jun 08 15:59:45 2017 +0000

description:
Don't use "NULL" to talk about null-terminated strings.

The C standard seems to be inconsistent about dash vs. space.  Old
text uses dash, Annex K uses space.  I'll let wizd(8) to sort that
out.

diffstat:

 lib/libc/stdio/fgetln.c   |  6 +++---
 lib/libc/stdio/fgetstr.c  |  6 +++---
 lib/libc/stdio/getdelim.c |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 4503dd87ae57 -r fbf917ca41a9 lib/libc/stdio/fgetln.c
--- a/lib/libc/stdio/fgetln.c   Thu Jun 08 15:59:15 2017 +0000
+++ b/lib/libc/stdio/fgetln.c   Thu Jun 08 15:59:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $  */
+/*     $NetBSD: fgetln.c,v 1.17 2017/06/08 15:59:45 uwe Exp $  */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $");
+__RCSID("$NetBSD: fgetln.c,v 1.17 2017/06/08 15:59:45 uwe Exp $");
 
 #include "namespace.h"
 
@@ -49,7 +49,7 @@
 /*
  * Get an input line.
  * This now uses getdelim(3) for a code reduction.
- * The upside is that strings are now always NULL terminated, but relying
+ * The upside is that strings are now always null-terminated, but relying
  * on this is non portable - better to use the POSIX getdelim(3) function.
  */
 char *
diff -r 4503dd87ae57 -r fbf917ca41a9 lib/libc/stdio/fgetstr.c
--- a/lib/libc/stdio/fgetstr.c  Thu Jun 08 15:59:15 2017 +0000
+++ b/lib/libc/stdio/fgetstr.c  Thu Jun 08 15:59:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fgetstr.c,v 1.11 2010/01/11 20:39:29 joerg Exp $   */
+/* $NetBSD: fgetstr.c,v 1.12 2017/06/08 15:59:45 uwe Exp $     */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: fgetstr.c,v 1.11 2010/01/11 20:39:29 joerg Exp $");
+__RCSID("$NetBSD: fgetstr.c,v 1.12 2017/06/08 15:59:45 uwe Exp $");
 
 #include "namespace.h"
 
@@ -43,7 +43,7 @@
 /*
  * Get an input line.
  * This now uses getdelim(3) for a code reduction.
- * The upside is that strings are now always NULL terminated, but relying
+ * The upside is that strings are now always null-terminated, but relying
  * on this is non portable - better to use the POSIX getdelim(3) function.
  */
 char *
diff -r 4503dd87ae57 -r fbf917ca41a9 lib/libc/stdio/getdelim.c
--- a/lib/libc/stdio/getdelim.c Thu Jun 08 15:59:15 2017 +0000
+++ b/lib/libc/stdio/getdelim.c Thu Jun 08 15:59:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $ */
+/* $NetBSD: getdelim.c,v 1.14 2017/06/08 15:59:45 uwe Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $");
+__RCSID("$NetBSD: getdelim.c,v 1.14 2017/06/08 15:59:45 uwe Exp $");
 
 #include "namespace.h"
 
@@ -96,7 +96,7 @@
                        errno = EOVERFLOW;
                        goto error;
                }
-               newlen++; /* reserve space for the NULL terminator */
+               newlen++; /* reserve space for the null terminator */
                if (newlen > *buflen) {
                        if (newlen < MINBUF)
                                newlen = MINBUF;



Home | Main Index | Thread Index | Old Index