New compiler warnings
authorChris Tallon <chris@vomp.tv>
Tue, 11 Jun 2013 21:59:01 +0000 (22:59 +0100)
committerChris Tallon <chris@vomp.tv>
Tue, 11 Jun 2013 21:59:01 +0000 (22:59 +0100)
jsonserver.c

index 9ee9caf8f241ae5ab79d0be8f2532f57a50b513d..ad92beaf8c35f4f6138f3d5d713a449900c25083 100644 (file)
@@ -98,8 +98,12 @@ bool cPluginJsonserver::Start(void)
     return false;
   }
   char* configFile;
-  asprintf(&configFile, "%s/jsonserver.conf", configDir);
-
+  if (asprintf(&configFile, "%s/jsonserver.conf", configDir) == -1)
+  {
+    dsyslog("jsonserver: Error: asprintf");
+    return false;
+  }
+  
   dsyslog("%s", configFile);
   
   log = new Log();