From e84b1c5d2492c294dc9f456551614734d0a3861b Mon Sep 17 00:00:00 2001 From: "Constantine A. Murenin" Date: Sun, 7 Dec 2008 01:11:51 +0000 Subject: fix an 11-year-old typo in an if statement; 'null dereference' llvm/clang; ok millert --- sbin/disklabel/editor.c | 6 +++--- 1 file 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 @@ -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 @@ -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) { -- cgit v1.2.3