diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-10-13 17:17:50 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-10-13 17:17:50 +0000 |
commit | b4b86377af579d3da62db347352461e0092cf831 (patch) | |
tree | 9c68d2cda61179b1ec2c2b4c0054946d2e0acd51 | |
parent | c652fa1474dc30560bf39f7d5634665d1b98bf8f (diff) | |
download | FreeBSD-src-b4b86377af579d3da62db347352461e0092cf831.zip FreeBSD-src-b4b86377af579d3da62db347352461e0092cf831.tar.gz |
Don't do a logical AND of the result of strcmp() with a constant.
Found with: clang
-rw-r--r-- | sys/dev/ce/if_ce.c | 2 | ||||
-rw-r--r-- | sys/dev/cp/if_cp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c index d151b42..0213440 100644 --- a/sys/dev/ce/if_ce.c +++ b/sys/dev/ce/if_ce.c @@ -1313,7 +1313,7 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc IFP2SP(d->ifp)->pp_flags &= ~(PP_FR); IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE; d->ifp->if_flags |= PP_CISCO; - } else if (! strcmp ("fr", (char*)data) && PP_FR) { + } else if (! strcmp ("fr", (char*)data)) { d->ifp->if_flags &= ~(PP_CISCO); IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; } else if (! strcmp ("ppp", (char*)data)) { diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index e640230..6613fad 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -1052,7 +1052,7 @@ static int cp_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc IFP2SP(d->ifp)->pp_flags &= ~(PP_FR); IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE; d->ifp->if_flags |= PP_CISCO; - } else if (! strcmp ("fr", (char*)data) && PP_FR) { + } else if (! strcmp ("fr", (char*)data)) { d->ifp->if_flags &= ~(PP_CISCO); IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; } else if (! strcmp ("ppp", (char*)data)) { |