Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec C99 6.5.15 Conditional operator note 3 states t...



details:   https://anonhg.NetBSD.org/src/rev/a59ccaf86471
branches:  trunk
changeset: 331532:a59ccaf86471
user:      plunky <plunky%NetBSD.org@localhost>
date:      Wed Aug 13 19:43:47 2014 +0000

description:
C99 6.5.15 Conditional operator note 3 states that the second and
third operators of a ?: operation shoud (amongst other conditions)
either both be integer type, or both void type. cast the second
to (void) then, as log() is already a void and no result is desired.

diffstat:

 sys/netipsec/ipsec.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 88c6edc580fd -r a59ccaf86471 sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c      Wed Aug 13 19:32:35 2014 +0000
+++ b/sys/netipsec/ipsec.c      Wed Aug 13 19:43:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.c,v 1.63 2014/05/30 01:39:03 christos Exp $      */
+/*     $NetBSD: ipsec.c,v 1.64 2014/08/13 19:43:47 plunky Exp $        */
 /*     $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $       */
 /*     $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.63 2014/05/30 01:39:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.64 2014/08/13 19:43:47 plunky Exp $");
 
 /*
  * IPsec controller part.
@@ -1748,7 +1748,7 @@
     (((lev) != IPSEC_LEVEL_USE && (lev) != IPSEC_LEVEL_REQUIRE         \
     && (lev) != IPSEC_LEVEL_UNIQUE) ?                                  \
        (ipsec_debug ? log(LOG_INFO, "fixed system default level " #lev \
-       ":%d->%d\n", (lev), IPSEC_LEVEL_REQUIRE) : 0),                  \
+       ":%d->%d\n", (lev), IPSEC_LEVEL_REQUIRE) : (void)0),            \
        (lev) = IPSEC_LEVEL_REQUIRE, (lev)                              \
     : (lev))
 



Home | Main Index | Thread Index | Old Index