Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libutil fix lack of '>' pointed out in PR/48517



details:   https://anonhg.NetBSD.org/src/rev/b099ca074393
branches:  trunk
changeset: 331127:b099ca074393
user:      ryo <ryo%NetBSD.org@localhost>
date:      Sat Aug 02 11:19:01 2014 +0000

description:
fix lack of '>' pointed out in PR/48517

diffstat:

 common/lib/libutil/snprintb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 40c163b64027 -r b099ca074393 common/lib/libutil/snprintb.c
--- a/common/lib/libutil/snprintb.c     Sat Aug 02 09:16:22 2014 +0000
+++ b/common/lib/libutil/snprintb.c     Sat Aug 02 11:19:01 2014 +0000
@@ -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 @@
 #  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 @@
                }
        }
        l_len++;
-       if (val != 0 && (size_t)(++t_len) < buflen)
+       if (sep != '<' && (size_t)(++t_len) < buflen)
                *bp++ = '>';
 terminate:
        *bp++ = '\0';



Home | Main Index | Thread Index | Old Index