1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-28 02:50:16 +03:00

tree-wide: Fix, replace assert() by assert_se() when there is side effect

This commit is contained in:
Benjamin Robin 2020-05-06 20:30:43 +02:00
parent 0a0e594a26
commit f391597c67
2 changed files with 3 additions and 3 deletions

View File

@ -172,8 +172,8 @@ static int import_fs(int argc, char *argv[], void *userdata) {
progress.limit = (RateLimit) { 200*USEC_PER_MSEC, 1 };
/* Hook into SIGINT/SIGTERM, so that we can cancel things then */
assert(sigaction(SIGINT, &sa, &old_sigint_sa) >= 0);
assert(sigaction(SIGTERM, &sa, &old_sigterm_sa) >= 0);
assert_se(sigaction(SIGINT, &sa, &old_sigint_sa) >= 0);
assert_se(sigaction(SIGTERM, &sa, &old_sigterm_sa) >= 0);
r = btrfs_subvol_snapshot_fd_full(
fd,

View File

@ -1722,7 +1722,7 @@ static int context_dump_partition_bar(Context *context, const char *node) {
bool z = false;
size_t c, j = 0;
assert((c = columns()) >= 2);
assert_se((c = columns()) >= 2);
c -= 2; /* We do not use the leftmost and rightmost character cell */
bar = new0(Partition*, c);