From 4a44f1cc346e0eda19c74e22a61870ca30b4c799 Mon Sep 17 00:00:00 2001 From: yar Date: Wed, 7 Mar 2007 07:45:38 +0000 Subject: Don't leave a NULL value in mdsuffix when a particular md unit w/o suffix is specified. It had better be an empty string as it will be passed to a printf-like function that builds the command line to run. PR: kern/109863 MFC after: 1 week --- sbin/mdmfs/mdmfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c index c552f56..acc6e00 100644 --- a/sbin/mdmfs/mdmfs.c +++ b/sbin/mdmfs/mdmfs.c @@ -246,9 +246,8 @@ main(int argc, char **argv) ul = strtoul(unitstr, &p, 10); if (ul == ULONG_MAX) errx(1, "bad device unit: %s", unitstr); - if (*p != '\0') - mdsuffix = p; unit = ul; + mdsuffix = p; /* can be empty */ } mtpoint = argv[1]; -- cgit v1.1