Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/cap_mkdb Move assignment out of assertion in cap_mkdb.



details:   https://anonhg.NetBSD.org/src/rev/822e26b9f940
branches:  trunk
changeset: 784271:822e26b9f940
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jan 23 20:27:01 2013 +0000

description:
Move assignment out of assertion in cap_mkdb.

diffstat:

 usr.bin/cap_mkdb/cap_mkdb.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 90031ba01b47 -r 822e26b9f940 usr.bin/cap_mkdb/cap_mkdb.c
--- a/usr.bin/cap_mkdb/cap_mkdb.c       Wed Jan 23 20:22:34 2013 +0000
+++ b/usr.bin/cap_mkdb/cap_mkdb.c       Wed Jan 23 20:27:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cap_mkdb.c,v 1.27 2011/08/29 13:56:17 joerg Exp $      */
+/*     $NetBSD: cap_mkdb.c,v 1.28 2013/01/23 20:27:01 riastradh Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)cap_mkdb.c 8.2 (Berkeley) 4/27/95";
 #endif
-__RCSID("$NetBSD: cap_mkdb.c,v 1.27 2011/08/29 13:56:17 joerg Exp $");
+__RCSID("$NetBSD: cap_mkdb.c,v 1.28 2013/01/23 20:27:01 riastradh Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -141,7 +141,8 @@
 
        if (capdbp->close(capdbp) < 0)
                err(1, "%s", capname);
-       assert((p = strrchr(buf, '.')) != NULL);
+       p = strrchr(buf, '.');
+       assert(p != NULL);
        *p = '\0';
        if (rename(capname, buf) == -1)
                err(1, "rename");



Home | Main Index | Thread Index | Old Index