chiark / gitweb /
util: add timeout to generator execution
[elogind.git] / src / journal / journal-gatewayd.c
index c51afbfeb985fab6fa70704c5036d28b16d202c3..7e97a3588ce09abbd18befd4f094b05a6bec887e 100644 (file)
@@ -131,6 +131,7 @@ static int respond_oom_internal(struct MHD_Connection *connection) {
 
 #define respond_oom(connection) log_oom(), respond_oom_internal(connection)
 
+_printf_(3,4)
 static int respond_error(
                 struct MHD_Connection *connection,
                 unsigned code,
@@ -743,10 +744,10 @@ static int request_handler_file(
 
 static int get_virtualization(char **v) {
         _cleanup_bus_unref_ sd_bus *bus = NULL;
-        char *b;
+        char *b = NULL;
         int r;
 
-        r = sd_bus_open_system(&bus);
+        r = sd_bus_default_system(&bus);
         if (r < 0)
                 return r;
 
@@ -779,7 +780,7 @@ static int request_handler_machine(
         RequestMeta *m = connection_cls;
         int r;
         _cleanup_free_ char* hostname = NULL, *os_name = NULL;
-        uint64_t cutoff_from, cutoff_to, usage;
+        uint64_t cutoff_from = 0, cutoff_to = 0, usage;
         char *json;
         sd_id128_t mid, bid;
         _cleanup_free_ char *v = NULL;