summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbcallah <bcallah@openbsd.org>2014-12-30 22:05:32 +0000
committerbcallah <bcallah@openbsd.org>2014-12-30 22:05:32 +0000
commit66f466f833a61212b68ddf482d46d817faf2fd64 (patch)
tree5958f843bd78fde4b2b4484ddec42d42d4480c62
parentfix wrong paths below FILES; from Theo Buehler <theo at math dot ethz dot ch> (diff)
downloadwireguard-openbsd-66f466f833a61212b68ddf482d46d817faf2fd64.tar.xz
wireguard-openbsd-66f466f833a61212b68ddf482d46d817faf2fd64.zip
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.c6
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';