Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs Avoid magic manipulation of the format string.



details:   https://anonhg.NetBSD.org/src/rev/8383909cac67
branches:  trunk
changeset: 768723:8383909cac67
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Aug 25 16:17:58 2011 +0000

description:
Avoid magic manipulation of the format string.

diffstat:

 sbin/newfs/mkfs.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b5b317f5bbc9 -r 8383909cac67 sbin/newfs/mkfs.c
--- a/sbin/newfs/mkfs.c Thu Aug 25 16:15:29 2011 +0000
+++ b/sbin/newfs/mkfs.c Thu Aug 25 16:17:58 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkfs.c,v 1.109 2011/03/06 17:08:16 bouyer Exp $        */
+/*     $NetBSD: mkfs.c,v 1.110 2011/08/25 16:17:58 joerg Exp $ */
 
 /*
  * Copyright (c) 1980, 1989, 1993
@@ -73,7 +73,7 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c     8.11 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: mkfs.c,v 1.109 2011/03/06 17:08:16 bouyer Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.110 2011/08/25 16:17:58 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -677,7 +677,7 @@
                        continue;
                }
                /* Print superblock numbers */
-               len = printf(" %*" PRIu64 "," + !col, fld_width,
+               len = printf("%s%*" PRIu64 ",", col ? " " : "", fld_width,
                    (uint64_t)fsbtodb(&sblock, cgsblock(&sblock, cylno)));
                col += len;
                if (col + len < max_cols)



Home | Main Index | Thread Index | Old Index