Module Name: src
Committed By: ryo
Date: Sat Aug 2 11:19:01 UTC 2014
Modified Files:
src/common/lib/libutil: snprintb.c
Log Message:
fix lack of '>' pointed out in PR/48517
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/common/lib/libutil/snprintb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.15 src/common/lib/libutil/snprintb.c:1.16
--- src/common/lib/libutil/snprintb.c:1.15 Fri Jun 6 07:08:37 2014
+++ src/common/lib/libutil/snprintb.c Sat Aug 2 11:19:01 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: snprintb.c,v 1.15 2014/06/06 07:08:37 shm Exp $ */
+/* $NetBSD: snprintb.c,v 1.16 2014/08/02 11:19:01 ryo Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
# include <sys/cdefs.h>
# if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: snprintb.c,v 1.15 2014/06/06 07:08:37 shm Exp $");
+__RCSID("$NetBSD: snprintb.c,v 1.16 2014/08/02 11:19:01 ryo Exp $");
# endif
# include <sys/types.h>
@@ -51,7 +51,7 @@ __RCSID("$NetBSD: snprintb.c,v 1.15 2014
# include <errno.h>
# else /* ! _KERNEL */
# include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.15 2014/06/06 07:08:37 shm Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.16 2014/08/02 11:19:01 ryo Exp $");
# include <sys/param.h>
# include <sys/inttypes.h>
# include <sys/systm.h>
@@ -257,7 +257,7 @@ snprintb_m(char *buf, size_t buflen, con
}
}
l_len++;
- if (val != 0 && (size_t)(++t_len) < buflen)
+ if (sep != '<' && (size_t)(++t_len) < buflen)
*bp++ = '>';
terminate:
*bp++ = '\0';