don't compare string pointers against \0

This commit is contained in:
mrg 2019-02-03 11:58:38 +00:00
parent 3c12e409b2
commit 17d7cc6112
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: promdev.c,v 1.28 2017/03/25 09:21:21 martin Exp $ */
/* $NetBSD: promdev.c,v 1.29 2019/02/03 11:58:38 mrg Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@ -234,7 +234,7 @@ devopen(struct open_file *f, const char *fname, char **file)
memcpy(disk_pd, pd, sizeof(struct promdata));
if (prom_version() != PROM_OLDMON) {
strcpy(rawpart, prom_bootdevice);
if ((partition = strchr(rawpart, ':')) != '\0' &&
if ((partition = strchr(rawpart, ':')) != NULL &&
*++partition >= 'a' &&
*partition <= 'a' + MAXPARTITIONS) {
part = *partition - 'a';