mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Check return value for setenv()
This commit is contained in:
parent
02f0a39fed
commit
ee8f97394e
1 changed files with 7 additions and 3 deletions
|
|
@ -140,16 +140,20 @@ main(int argc, char *argv[])
|
|||
cflag = 1;
|
||||
break;
|
||||
case 'h':
|
||||
setenv("BLOCKSIZE", "512", 1);
|
||||
if (setenv("BLOCKSIZE", "512", 1) == -1)
|
||||
warnx(
|
||||
"setenv: cannot set BLOCKSIZE=512");
|
||||
hflag = 1;
|
||||
break;
|
||||
case 'k':
|
||||
hflag = 0;
|
||||
setenv("BLOCKSIZE", "1024", 1);
|
||||
if (setenv("BLOCKSIZE", "1024", 1) == -1)
|
||||
warnx("setenv: cannot set BLOCKSIZE=1024");
|
||||
break;
|
||||
case 'm':
|
||||
hflag = 0;
|
||||
setenv("BLOCKSIZE", "1048576", 1);
|
||||
if (setenv("BLOCKSIZE", "1048576", 1) == -1)
|
||||
warnx("setenv: cannot set BLOCKSIZE=1048576");
|
||||
break;
|
||||
case 'n':
|
||||
nodumpflag = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue