]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: use assert() when no state is changed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Mar 2022 16:44:31 +0000 (01:44 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 17 Mar 2022 11:10:17 +0000 (20:10 +0900)
src/partition/repart.c

index 8345b6f5827a32b888dff0739f8ddeced6ccbf10..52fd0436e357fc76e77245a83f0c055df7570bad 100644 (file)
@@ -1778,11 +1778,11 @@ static int context_load_partition_table(
                 }
 
                 sz = fdisk_partition_get_size(p);
-                assert_se(sz <= UINT64_MAX/secsz);
+                assert(sz <= UINT64_MAX/secsz);
                 sz *= secsz;
 
                 start = fdisk_partition_get_start(p);
-                assert_se(start <= UINT64_MAX/secsz);
+                assert(start <= UINT64_MAX/secsz);
                 start *= secsz;
 
                 partno = fdisk_partition_get_partno(p);
@@ -4799,7 +4799,7 @@ static int determine_auto_size(Context *c) {
         uint64_t sum;
         Partition *p;
 
-        assert_se(c);
+        assert(c);
 
         sum = round_up_size(GPT_METADATA_SIZE, 4096);
 
@@ -4981,7 +4981,7 @@ static int run(int argc, char *argv[]) {
                 /* Flush out everything again, and let's grow the file first, then start fresh */
                 context_unload_partition_table(context);
 
-                assert_se(arg_size != UINT64_MAX);
+                assert(arg_size != UINT64_MAX);
                 r = resize_backing_fd(
                                 node,
                                 &backing_fd,