setenv(3) sets errno on failure, use warn() instead

Pointed out by: ru
This commit is contained in:
Kevin Lo 2007-11-08 01:24:31 +00:00
parent a03be42da6
commit d4c16fe37d

View File

@ -141,19 +141,19 @@ main(int argc, char *argv[])
break;
case 'h':
if (setenv("BLOCKSIZE", "512", 1) == -1)
warnx(
warn(
"setenv: cannot set BLOCKSIZE=512");
hflag = 1;
break;
case 'k':
hflag = 0;
if (setenv("BLOCKSIZE", "1024", 1) == -1)
warnx("setenv: cannot set BLOCKSIZE=1024");
warn("setenv: cannot set BLOCKSIZE=1024");
break;
case 'm':
hflag = 0;
if (setenv("BLOCKSIZE", "1048576", 1) == -1)
warnx("setenv: cannot set BLOCKSIZE=1048576");
warn("setenv: cannot set BLOCKSIZE=1048576");
break;
case 'n':
nodumpflag = 1;