X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fhtparser.c;h=b7435b9be18972793a43e1bc6cea753f7450d1a0;hp=348a9407f3a9733ff66e3ded9e34248dd5d9c1d4;hb=eb174cf6ed3d71e9ed521733a139cb77338898c7;hpb=5599a52ae7067a2c2afd0fda9edd3046043847c1 diff --git a/src/htparser.c b/src/htparser.c index 348a940..b7435b9 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -621,16 +621,16 @@ int main(int argc, char **argv) usesyslog = 1; break; case 'u': - if((pwent = getpwnam(optarg)) == NULL) { + if(optarg[0] && ((pwent = getpwnam(optarg)) == NULL)) { flog(LOG_ERR, "could not find user %s", optarg); exit(1); } break; case 'r': - root = optarg; + root = optarg[0] ? optarg : NULL; break; case 'p': - pidfile = optarg; + pidfile = optarg[0] ? optarg : NULL; break; default: usage(stderr);