Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing GCC warning

  • Loading branch information...
commit 3bf2eac1b88e5e9661d66f355005071568080f60 1 parent 62602c1
@armon authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/config.c
View
10 src/config.c
@@ -1,11 +1,12 @@
-#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include <errno.h>
-#include <syslog.h>
#include <sys/stat.h>
-#include <fcntl.h>
+#include <syslog.h>
#include <unistd.h>
#include "config.h"
#include "ini.h"
@@ -183,6 +184,7 @@ char* join_path(char *path, char *part2) {
res = asprintf(&buf, "%s%s", path, part2);
else
res = asprintf(&buf, "%s/%s", path, part2);
+ assert(res != -1);
// Return the new buffer
return buf;
Please sign in to comment.
Something went wrong with that request. Please try again.