From b4b86377af579d3da62db347352461e0092cf831 Mon Sep 17 00:00:00 2001 From: rpaulo Date: Wed, 13 Oct 2010 17:17:50 +0000 Subject: Don't do a logical AND of the result of strcmp() with a constant. Found with: clang --- sys/dev/cp/if_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/cp') 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)) { -- cgit v1.1