diff options
author | 2014-06-12 16:29:41 +0000 | |
---|---|---|
committer | 2014-06-12 16:29:41 +0000 | |
commit | 0f0252d58853de1c310d870d0e2a5b2785d0ee77 (patch) | |
tree | 1c389b89524dc5941dfd53ebed102b15e0ede933 | |
parent | tags as requested by miod and tedu (diff) | |
download | wireguard-openbsd-0f0252d58853de1c310d870d0e2a5b2785d0ee77.tar.xz wireguard-openbsd-0f0252d58853de1c310d870d0e2a5b2785d0ee77.zip |
Remove a comparison that is always true. Reported by clang.
Merge the new if into a single line, requested by florian@
ok matthew@ florian@
-rw-r--r-- | usr.bin/mg/buffer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c index 331fbbb0dd0..de7b59c71af 100644 --- a/usr.bin/mg/buffer.c +++ b/usr.bin/mg/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.93 2014/03/20 07:47:29 lum Exp $ */ +/* $OpenBSD: buffer.c,v 1.94 2014/06/12 16:29:41 bcallah Exp $ */ /* This file is in the public domain. */ @@ -458,8 +458,7 @@ anycb(int f) char pbuf[NFILEN + 11]; for (bp = bheadp; bp != NULL; bp = bp->b_bufp) { - if (bp->b_fname != NULL && *(bp->b_fname) != '\0' && - (bp->b_flag & BFCHG) != 0) { + if (*(bp->b_fname) != '\0' && (bp->b_flag & BFCHG) != 0) { ret = snprintf(pbuf, sizeof(pbuf), "Save file %s", bp->b_fname); if (ret < 0 || ret >= sizeof(pbuf)) { |