Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdio Initialize f._file for locking primitives.



details:   https://anonhg.NetBSD.org/src/rev/7a2c23a72df7
branches:  trunk
changeset: 480845:7a2c23a72df7
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Fri Jan 21 19:51:36 2000 +0000

description:
Initialize f._file for locking primitives.

diffstat:

 lib/libc/stdio/asprintf.c  |  5 +++--
 lib/libc/stdio/snprintf.c  |  5 +++--
 lib/libc/stdio/sprintf.c   |  5 +++--
 lib/libc/stdio/vasprintf.c |  5 +++--
 lib/libc/stdio/vsnprintf.c |  5 +++--
 lib/libc/stdio/vsprintf.c  |  5 +++--
 6 files changed, 18 insertions(+), 12 deletions(-)

diffs (156 lines):

diff -r 83b87e347779 -r 7a2c23a72df7 lib/libc/stdio/asprintf.c
--- a/lib/libc/stdio/asprintf.c Fri Jan 21 18:49:52 2000 +0000
+++ b/lib/libc/stdio/asprintf.c Fri Jan 21 19:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asprintf.c,v 1.6 1999/09/20 04:39:25 lukem Exp $       */
+/*     $NetBSD: asprintf.c,v 1.7 2000/01/21 19:51:36 mycroft Exp $     */
 
 /*
  * Copyright (c) 1997 Todd C. Miller <Todd.Miller%courtesan.com@localhost>
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: asprintf.c,v 1.6 1999/09/20 04:39:25 lukem Exp $");
+__RCSID("$NetBSD: asprintf.c,v 1.7 2000/01/21 19:51:36 mycroft Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -64,6 +64,7 @@
 #else
        va_start(ap);
 #endif
+       f._file = -1;
        f._flags = __SWR | __SSTR | __SALC;
        f._bf._base = f._p = (unsigned char *)malloc(128);
        if (f._bf._base == NULL)
diff -r 83b87e347779 -r 7a2c23a72df7 lib/libc/stdio/snprintf.c
--- a/lib/libc/stdio/snprintf.c Fri Jan 21 18:49:52 2000 +0000
+++ b/lib/libc/stdio/snprintf.c Fri Jan 21 19:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: snprintf.c,v 1.10 1999/09/20 04:39:33 lukem Exp $      */
+/*     $NetBSD: snprintf.c,v 1.11 2000/01/21 19:51:37 mycroft Exp $    */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: snprintf.c,v 1.10 1999/09/20 04:39:33 lukem Exp $");
+__RCSID("$NetBSD: snprintf.c,v 1.11 2000/01/21 19:51:37 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -85,6 +85,7 @@
 #else
        va_start(ap);
 #endif
+       f._file = -1;
        f._flags = __SWR | __SSTR;
        f._bf._base = f._p = (unsigned char *)str;
        f._bf._size = f._w = n - 1;
diff -r 83b87e347779 -r 7a2c23a72df7 lib/libc/stdio/sprintf.c
--- a/lib/libc/stdio/sprintf.c  Fri Jan 21 18:49:52 2000 +0000
+++ b/lib/libc/stdio/sprintf.c  Fri Jan 21 19:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sprintf.c,v 1.8 1999/09/20 04:39:33 lukem Exp $        */
+/*     $NetBSD: sprintf.c,v 1.9 2000/01/21 19:51:37 mycroft Exp $      */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)sprintf.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: sprintf.c,v 1.8 1999/09/20 04:39:33 lukem Exp $");
+__RCSID("$NetBSD: sprintf.c,v 1.9 2000/01/21 19:51:37 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -73,6 +73,7 @@
        _DIAGASSERT(str != NULL);
        _DIAGASSERT(fmt != NULL);
 
+       f._file = -1;
        f._flags = __SWR | __SSTR;
        f._bf._base = f._p = (unsigned char *)str;
        f._bf._size = f._w = INT_MAX;
diff -r 83b87e347779 -r 7a2c23a72df7 lib/libc/stdio/vasprintf.c
--- a/lib/libc/stdio/vasprintf.c        Fri Jan 21 18:49:52 2000 +0000
+++ b/lib/libc/stdio/vasprintf.c        Fri Jan 21 19:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vasprintf.c,v 1.6 1999/09/20 04:39:33 lukem Exp $      */
+/*     $NetBSD: vasprintf.c,v 1.7 2000/01/21 19:51:37 mycroft Exp $    */
 
 /*
  * Copyright (c) 1997 Todd C. Miller <Todd.Miller%courtesan.com@localhost>
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vasprintf.c,v 1.6 1999/09/20 04:39:33 lukem Exp $");
+__RCSID("$NetBSD: vasprintf.c,v 1.7 2000/01/21 19:51:37 mycroft Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -50,6 +50,7 @@
        _DIAGASSERT(str != NULL);
        _DIAGASSERT(fmt != NULL);
 
+       f._file = -1;
        f._flags = __SWR | __SSTR | __SALC;
        f._bf._base = f._p = (unsigned char *)malloc(128);
        if (f._bf._base == NULL)
diff -r 83b87e347779 -r 7a2c23a72df7 lib/libc/stdio/vsnprintf.c
--- a/lib/libc/stdio/vsnprintf.c        Fri Jan 21 18:49:52 2000 +0000
+++ b/lib/libc/stdio/vsnprintf.c        Fri Jan 21 19:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vsnprintf.c,v 1.11 1999/09/20 04:39:34 lukem Exp $     */
+/*     $NetBSD: vsnprintf.c,v 1.12 2000/01/21 19:51:37 mycroft Exp $   */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)vsnprintf.c        8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: vsnprintf.c,v 1.11 1999/09/20 04:39:34 lukem Exp $");
+__RCSID("$NetBSD: vsnprintf.c,v 1.12 2000/01/21 19:51:37 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -70,6 +70,7 @@
 
        if ((int)n < 1)
                return (-1);
+       f._file = -1;
        f._flags = __SWR | __SSTR;
        f._bf._base = f._p = (unsigned char *)str;
        f._bf._size = f._w = n - 1;
diff -r 83b87e347779 -r 7a2c23a72df7 lib/libc/stdio/vsprintf.c
--- a/lib/libc/stdio/vsprintf.c Fri Jan 21 18:49:52 2000 +0000
+++ b/lib/libc/stdio/vsprintf.c Fri Jan 21 19:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vsprintf.c,v 1.9 1999/09/20 04:39:34 lukem Exp $       */
+/*     $NetBSD: vsprintf.c,v 1.10 2000/01/21 19:51:40 mycroft Exp $    */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)vsprintf.c 8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: vsprintf.c,v 1.9 1999/09/20 04:39:34 lukem Exp $");
+__RCSID("$NetBSD: vsprintf.c,v 1.10 2000/01/21 19:51:40 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -62,6 +62,7 @@
        _DIAGASSERT(str != NULL);
        _DIAGASSERT(fmt != NULL);
 
+       f._file = -1;
        f._flags = __SWR | __SSTR;
        f._bf._base = f._p = (unsigned char *)str;
        f._bf._size = f._w = INT_MAX;



Home | Main Index | Thread Index | Old Index