pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Make style more consistent.
details: https://anonhg.NetBSD.org/pkgsrc/rev/ed4aee1822ac
branches: trunk
changeset: 543523:ed4aee1822ac
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Jun 19 17:28:09 2008 +0000
description:
Make style more consistent.
diffstat:
pkgtools/libnbcompat/files/snprintf.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r f796975d3b26 -r ed4aee1822ac pkgtools/libnbcompat/files/snprintf.c
--- a/pkgtools/libnbcompat/files/snprintf.c Thu Jun 19 16:59:49 2008 +0000
+++ b/pkgtools/libnbcompat/files/snprintf.c Thu Jun 19 17:28:09 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snprintf.c,v 1.6 2008/02/14 19:14:54 tnn Exp $ */
+/* $NetBSD: snprintf.c,v 1.7 2008/06/19 17:28:09 joerg Exp $ */
/*-
* Copyright (c) 2007 Tobias Nygren <tnn%NetBSD.org@localhost>
@@ -59,9 +59,9 @@
char *p = buf;
static FILE *devnull = 0;
- if (!devnull) {
+ if (devnull == NULL) {
devnull = fopen("/dev/null", "w");
- if (!devnull)
+ if (devnull == NULL)
return -1;
}
@@ -70,13 +70,13 @@
return len;
if (len > 128) {
- p = malloc(len + 1);
- if (!p)
+ p = malloc(len + 1);
+ if (p == NULL)
return -1;
}
vsprintf(p, format, ap);
-
+
if (size > 0) {
memcpy(str, p, MIN(len, size));
str[MIN(len, size - 1)] = 0;
Home |
Main Index |
Thread Index |
Old Index