Permalink
Browse files

Fixing GCC warning

  • Loading branch information...
1 parent 62602c1 commit 3bf2eac1b88e5e9661d66f355005071568080f60 @armon armon committed Sep 17, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/config.c
View
@@ -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;

0 comments on commit 3bf2eac

Please sign in to comment.