diff --git a/src/serve.c b/src/serve.c index 71f97c5..01a0869 100644 --- a/src/serve.c +++ b/src/serve.c @@ -147,7 +147,8 @@ serve_cgi(struct gmnisrv_client *client, const char *path, char cwd[PATH_MAX + 1]; strcpy(cwd, path); - chdir(dirname(cwd)); + int chdir_res = chdir(dirname(cwd)); + assert(chdir_res != -1); // I don't feel like freeing this stuff and this process is // going to die soon anyway so let's just be hip and call it an