-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <curl/curl.h>
#include <stdbool.h>
_fallthrough_;
case ENTRY_BOOT_ID: {
sd_id128_t boot_id;
- char sid[33];
+ char sid[SD_ID128_STRING_MAX];
r = sd_journal_get_monotonic_usec(u->journal, NULL, &boot_id);
if (r < 0)
size_t len;
c = memchr(u->field_data, '=', u->field_length);
- if (!c || c == u->field_data) {
- log_error("Invalid field.");
- return -EINVAL;
- }
+ if (!c || c == u->field_data)
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "Invalid field.");
len = c - (const char*)u->field_data;
return pos;
default:
- assert_not_reached("WTF?");
+ assert_not_reached();
}
}
- assert_not_reached("WTF?");
+ assert_not_reached();
}
-static inline void check_update_watchdog(Uploader *u) {
+static void check_update_watchdog(Uploader *u) {
usec_t after;
usec_t elapsed_time;
return log_error_errno(r, "Failed to register input event: %m");
log_debug("Listening for journal events on fd:%d, timeout %d",
- fd, u->timeout == (uint64_t) -1 ? -1 : (int) u->timeout);
+ fd, u->timeout == UINT64_MAX ? -1 : (int) u->timeout);
} else
log_debug("Not listening for journal events.");
cursor);
}
- return process_journal_input(u, 1 + !!after_cursor);
+ return process_journal_input(u, !!after_cursor);
}