Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/makefs stampst.st_ion consistent treatment (non-zer...



details:   https://anonhg.NetBSD.org/src/rev/e65e0e53833f
branches:  trunk
changeset: 821531:e65e0e53833f
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Feb 08 21:27:26 2017 +0000

description:
stampst.st_ion consistent treatment (non-zero vs zero instead of testing == 1)

diffstat:

 usr.sbin/makefs/ffs.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r e8647353d313 -r e65e0e53833f usr.sbin/makefs/ffs.c
--- a/usr.sbin/makefs/ffs.c     Wed Feb 08 20:26:26 2017 +0000
+++ b/usr.sbin/makefs/ffs.c     Wed Feb 08 21:27:26 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs.c,v 1.68 2017/02/08 02:23:45 christos Exp $        */
+/*     $NetBSD: ffs.c,v 1.69 2017/02/08 21:27:26 christos Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.68 2017/02/08 02:23:45 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.69 2017/02/08 21:27:26 christos Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -532,7 +532,7 @@
        if (debug & DEBUG_FS_CREATE_IMAGE)
                printf("calling mkfs(\"%s\", ...)\n", image);
 
-       if (stampst.st_ino == 1)
+       if (stampst.st_ino)
                tstamp = stampst.st_ctime;
        else
                tstamp = start_time.tv_sec;
@@ -646,7 +646,7 @@
 {
        size_t slen;
        void *membuf;
-       struct stat *st = stampst.st_ino == 1 ? &stampst : &cur->inode->st;
+       struct stat *st = stampst.st_ino ? &stampst : &cur->inode->st;
 
        memset(dinp, 0, sizeof(*dinp));
        dinp->di_mode = cur->inode->st.st_mode;
@@ -696,7 +696,7 @@
 {
        size_t slen;
        void *membuf;
-       struct stat *st = stampst.st_ino == 1 ? &stampst : &cur->inode->st;
+       struct stat *st = stampst.st_ino ? &stampst : &cur->inode->st;
 
        memset(dinp, 0, sizeof(*dinp));
        dinp->di_mode = cur->inode->st.st_mode;



Home | Main Index | Thread Index | Old Index