Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/fssconfig Initialize `fss_flags' before setting an ...



details:   https://anonhg.NetBSD.org/src/rev/1b98b79e7c80
branches:  trunk
changeset: 780534:1b98b79e7c80
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sat Jul 28 15:09:44 2012 +0000

description:
Initialize `fss_flags' before setting an individual bit.
Not a real problem as there is only one valid bit yet.

>From Edgar Fuss via tech-kern%netbsd.org@localhost

diffstat:

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

diffs (22 lines):

diff -r 471889acaeb8 -r 1b98b79e7c80 usr.sbin/fssconfig/fssconfig.c
--- a/usr.sbin/fssconfig/fssconfig.c    Sat Jul 28 09:56:39 2012 +0000
+++ b/usr.sbin/fssconfig/fssconfig.c    Sat Jul 28 15:09:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fssconfig.c,v 1.8 2011/08/30 18:30:13 joerg Exp $      */
+/*     $NetBSD: fssconfig.c,v 1.9 2012/07/28 15:09:44 hannken Exp $    */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -168,10 +168,10 @@
                err(1, "open: %s", argv[0]);
        }
 
+       fss.fss_flags = 0;
        if ((xflag || istmp) && isreg)
                fss.fss_flags |= FSS_UNLINK_ON_CREATE;
-       else
-               fss.fss_flags = 0;
+
        if (ioctl(fd, FSSIOCSET, &fss) < 0) {
                if (istmp)
                        unlink(fss.fss_bstore);



Home | Main Index | Thread Index | Old Index