From 1556567b3333b3af4847753d239e0662e06f5c39 Mon Sep 17 00:00:00 2001 From: Matthew LeVan Date: Tue, 18 Jul 2023 12:03:44 -0400 Subject: [PATCH] disk/events: simplify code --- pkg/noun/events.c | 8 ++++---- pkg/vere/disk.c | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pkg/noun/events.c b/pkg/noun/events.c index 8b8d98993e..0294f522ab 100644 --- a/pkg/noun/events.c +++ b/pkg/noun/events.c @@ -1344,12 +1344,12 @@ c3_o u3e_backup(c3_c* pux_c, c3_c* pax_c, c3_o ovw_o) { // source image files from [pux_c] - u3e_image nux_u = { .nam_c = "north" }; - u3e_image sux_u = { .nam_c = "south" }; + u3e_image nux_u = { .nam_c = "north", .pgs_w = 0 }; + u3e_image sux_u = { .nam_c = "south", .pgs_w = 0 }; // destination image files to [pax_c] - u3e_image nax_u = { .nam_c = "north" }; - u3e_image sax_u = { .nam_c = "south" }; + u3e_image nax_u = { .nam_c = "north", .pgs_w = 0 }; + u3e_image sax_u = { .nam_c = "south", .pgs_w = 0 }; c3_i mod_i = O_RDWR | O_CREAT; diff --git a/pkg/vere/disk.c b/pkg/vere/disk.c index f87ce92154..e506b71153 100644 --- a/pkg/vere/disk.c +++ b/pkg/vere/disk.c @@ -1044,12 +1044,10 @@ u3_disk_init(c3_c* pax_c, u3_disk_cb cb_u, c3_o mig_o) } if ( c3y == u3_disk_need_migrate(log_u) ) { - if ( c3y == mig_o ) { - if ( c3n == u3_disk_migrate(log_u) ) { - fprintf(stderr, "disk: failed to migrate log\r\n"); - c3_free(log_u); - return 0; - } + if ( (c3y == mig_o) && (c3n == u3_disk_migrate(log_u)) ) { + fprintf(stderr, "disk: failed to migrate log\r\n"); + c3_free(log_u); + return 0; } else { fprintf(stderr, "disk: loading old format\r\n");