diff --git a/src/HttpRouter.c b/src/HttpRouter.c index ac3d401..6b93686 100644 --- a/src/HttpRouter.c +++ b/src/HttpRouter.c @@ -195,7 +195,7 @@ HttpRouterRoute(HttpRouter * router, char *path, void *args, void **ret) RouteNode *node; char *pathPart; char *tmp; - HttpRouteFunc *exec; + HttpRouteFunc *exec = NULL; Array *matches; size_t i; int retval; diff --git a/src/Main.c b/src/Main.c index 84b4b16..767ee7a 100644 --- a/src/Main.c +++ b/src/Main.c @@ -627,7 +627,10 @@ finish: * Change back into starting directory so initial chdir() * call works. */ - chdir(startDir); + if (chdir(startDir) != 0) + { + /* TODO: Seems problematic, what do we do? */ + } goto start; } diff --git a/src/Routes/RouteProcControl.c b/src/Routes/RouteProcControl.c index 76be5ad..83c9128 100644 --- a/src/Routes/RouteProcControl.c +++ b/src/Routes/RouteProcControl.c @@ -75,6 +75,7 @@ ROUTE_IMPL(RouteProcControl, path, argp) response = MatrixErrorCreate(M_UNRECOGNIZED); goto finish; } + break; case HTTP_GET: if (strcmp(op, "stats") == 0) {