diff options
author | Brian Callahan <bcallah@cvs.openbsd.org> | 2014-12-30 22:05:33 +0000 |
---|---|---|
committer | Brian Callahan <bcallah@cvs.openbsd.org> | 2014-12-30 22:05:33 +0000 |
commit | 2972a4c1cdaf8ee3ce235829cf27a7006a2d5e7f (patch) | |
tree | 859f36b1c3389a50d1983b27dc06795b98b94373 | |
parent | ae84ccf15ed9567c1ce8c9c1119c50b0423f148e (diff) |
Remove some checks that will always evaluate to true. Noticed by a very
recent clang.
ok schwarze@ lum@
-rw-r--r-- | usr.bin/mg/dired.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c index ce16df5e8ac..581ae3d7a01 100644 --- a/usr.bin/mg/dired.c +++ b/usr.bin/mg/dired.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dired.c,v 1.68 2014/11/16 04:16:41 guenther Exp $ */ +/* $OpenBSD: dired.c,v 1.69 2014/12/30 22:05:32 bcallah Exp $ */ /* This file is in the public domain. */ @@ -213,7 +213,7 @@ dired(int f, int n) char dname[NFILEN], *bufp, *slash; struct buffer *bp; - if (curbp->b_fname && curbp->b_fname[0] != '\0') { + if (curbp->b_fname[0] != '\0') { (void)strlcpy(dname, curbp->b_fname, sizeof(dname)); if ((slash = strrchr(dname, '/')) != NULL) { *(slash + 1) = '\0'; @@ -243,7 +243,7 @@ d_otherwindow(int f, int n) struct buffer *bp; struct mgwin *wp; - if (curbp->b_fname && curbp->b_fname[0] != '\0') { + if (curbp->b_fname[0] != '\0') { (void)strlcpy(dname, curbp->b_fname, sizeof(dname)); if ((slash = strrchr(dname, '/')) != NULL) { *(slash + 1) = '\0'; |