summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine A. Murenin <cnst@cvs.openbsd.org>2008-12-07 01:11:51 +0000
committerConstantine A. Murenin <cnst@cvs.openbsd.org>2008-12-07 01:11:51 +0000
commite84b1c5d2492c294dc9f456551614734d0a3861b (patch)
treed543839d9169aa065739eacd6662964e0bb0c2b8
parent8d5d2914101b52f61031d3e417f2f2790f69893d (diff)
fix an 11-year-old typo in an if statement; 'null dereference' llvm/clang; ok millert
-rw-r--r--sbin/disklabel/editor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index f8a5666d69e..08901c4c922 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.171 2008/09/03 11:13:54 jsg Exp $ */
+/* $OpenBSD: editor.c,v 1.172 2008/12/07 01:11:50 cnst Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.171 2008/09/03 11:13:54 jsg Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.172 2008/12/07 01:11:50 cnst Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -366,7 +366,7 @@ editor(struct disklabel *lp, int f, char *dev, char *fstabfile)
arg = getstring("Filename",
"Name of the file to save label into.",
NULL);
- if (arg == NULL && *arg == '\0')
+ if (arg == NULL || *arg == '\0')
break;
}
if ((fp = fopen(arg, "w")) == NULL) {