EFI_TCG2 *tpm2;
tpm2 = tcg2_interface_check();
- if (tpm2) {
+ if (tpm2)
return tpm2_measure_to_pcr_and_event_log(tpm2, pcrindex, buffer, buffer_size, description);
- }
tpm1 = tcg1_interface_check();
if (tpm1)
STRV_FOREACH_PAIR(unit_id, job_type, pairs) {
next = strlen(unit_log_field) + strlen(*unit_id);
- if (!GREEDY_REALLOC(ans, alloc, size + next + 1)) {
+ if (!GREEDY_REALLOC(ans, alloc, size + next + 1))
return mfree(ans);
- }
sprintf(ans + size, "%s%s", unit_log_field, *unit_id);
if (*(unit_id+1))
}
r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", *i);
- } else {
+ } else
r = bus_call_method(bus, &home_mgr, "GetUserRecordByUID", &error, &reply, "u", (uint32_t) uid);
- }
if (r < 0) {
log_error_errno(r, "Failed to inspect home: %s", bus_error_message(&error, r));
if (g->curl)
curl_multi_cleanup(g->curl);
- while ((io = hashmap_steal_first(g->ios))) {
+ while ((io = hashmap_steal_first(g->ios)))
sd_event_source_unref(io);
- }
hashmap_free(g->ios);
h = test_import(input, -1, 0);
assert_se(ordered_hashmap_size(h) == 1);
- ORDERED_HASHMAP_FOREACH(payload, h, j) {
+ ORDERED_HASHMAP_FOREACH(payload, h, j)
assert_se(streq(combined, payload));
- }
}
static void test_catalog_import_merge_no_body(void) {
h = test_import(input, -1, 0);
assert_se(ordered_hashmap_size(h) == 1);
- ORDERED_HASHMAP_FOREACH(payload, h, j) {
+ ORDERED_HASHMAP_FOREACH(payload, h, j)
assert_se(streq(combined, payload));
- }
}
static void test_catalog_update(const char *database) {
else if (streq(a[1], "XkbOptions"))
p = &c->x11_options;
- if (p) {
+ if (p)
free_and_replace(*p, a[2]);
- }
}
} else if (!in_section && first_word(l, "Section")) {
l = strv_split_newlines(str);
assert_se(l);
- STRV_FOREACH(s, l) {
+ STRV_FOREACH(s, l)
assert_se(streq(*s, input_table_multiple[i++]));
- }
}
static void test_strv_split_nulstr(void) {
printf("ID_TYPE=generic\n");
break;
}
- } else {
+ } else
printf("ID_TYPE=disk\n");
- }
printf("ID_BUS=ata\n");
printf("ID_MODEL=%s\n", model);
printf("ID_MODEL_ENC=%s\n", model_enc);
if (serial[0] != '\0') {
printf("ID_SERIAL=%s_%s\n", model, serial);
printf("ID_SERIAL_SHORT=%s\n", serial);
- } else {
+ } else
printf("ID_SERIAL=%s\n", model);
- }
if (id.command_set_1 & (1<<5)) {
printf("ID_ATA_WRITE_CACHE=1\n");
*/
(*buffer)++;
end = quote_string;
- } else {
+ } else
end = comma_string;
- }
val = strsep(buffer, end);
if (val && end == quote_string)
/*
is_touchscreen = true;
else if (has_joystick_axes_or_buttons)
is_joystick = true;
- } else if (has_joystick_axes_or_buttons) {
+ } else if (has_joystick_axes_or_buttons)
is_joystick = true;
- }
if (has_mt_coordinates) {
if (stylus_or_pen)
#if HAVE_AUDIT
if (c->audit_fd >= 0)
if (audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_BOOT, "", "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 &&
- errno != EPERM) {
+ errno != EPERM)
r = log_error_errno(errno, "Failed to send audit message: %m");
- }
#endif
/* If this call fails it will return 0, which
#if HAVE_AUDIT
if (c->audit_fd >= 0)
if (audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_SHUTDOWN, "", "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 &&
- errno != EPERM) {
+ errno != EPERM)
r = log_error_errno(errno, "Failed to send audit message: %m");
- }
#endif
q = utmp_put_shutdown();