From 66f466f833a61212b68ddf482d46d817faf2fd64 Mon Sep 17 00:00:00 2001 From: bcallah Date: Tue, 30 Dec 2014 22:05:32 +0000 Subject: [PATCH] Remove some checks that will always evaluate to true. Noticed by a very recent clang. ok schwarze@ lum@ --- usr.bin/mg/dired.c | 6 +++--- 1 file 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'; -- 2.20.1