From: Mark Wooding Date: Tue, 29 Jan 2013 23:49:38 +0000 (+0000) Subject: www-cgi/ucgitarget.c: Use `error' to report unusual filesystem object. X-Git-Url: https://git.distorted.org.uk/~mdw/userv-utils/commitdiff_plain/1ba0145fe6fe72f63af15e12716c13071523eaa4 www-cgi/ucgitarget.c: Use `error' to report unusual filesystem object. There's nothing useful in `errno'. Let's not end up saying `Success' here. --- diff --git a/www-cgi/ucgitarget.c b/www-cgi/ucgitarget.c index eb5fdab..4228951 100644 --- a/www-cgi/ucgitarget.c +++ b/www-cgi/ucgitarget.c @@ -94,7 +94,7 @@ int main(int argc, const char **argv) { if (scriptpath[scriptpathlen-1]=='~') error("bad char end"); r= stat(scriptpath,&stab); if (r) syserror("stat script"); if (S_ISREG(stab.st_mode)) break; - if (!S_ISDIR(stab.st_mode)) syserror("script not directory or file"); + if (!S_ISDIR(stab.st_mode)) error("script not directory or file"); lastslash= nextslash; } if (*nextslash) xsetenv("PATH_INFO",nextslash,1);