chiark / gitweb /
util: when using basename() for creating temporary files, verify the resulting name...
[elogind.git] / src / journal / test-journal-init.c
index 58f260d6c204a73ca3b5a8253d412c19f5f66ce9..11fb150fe83744abaa435f9c6b30877408f46d4c 100644 (file)
@@ -19,7 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "log.h"
 #include "util.h"
@@ -31,8 +31,12 @@ int main(int argc, char *argv[]) {
 
         log_set_max_level(LOG_DEBUG);
 
-        if (argc >= 2)
-                safe_atoi(argv[1], &I);
+        if (argc >= 2) {
+                r = safe_atoi(argv[1], &I);
+                if (r < 0)
+                        log_info("Could not parse loop count argument. Using default.");
+        }
+
         log_info("Running %d loops", I);
 
         assert_se(mkdtemp(t));