Skip to content

Commit d5d5762

Browse files
committed
flux-dump: remove unnecessary flag check
Problem: In progress_notify() a check for sd_notify_flag is done, but it is already done before every call to progress_notify(). Remove the unnecessary double check.
1 parent 52d9d80 commit d5d5762

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/cmd/builtin/dump.c

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,20 @@ void read_error (const char *fmt, ...)
6464

6565
static void progress_notify (flux_t *h)
6666
{
67-
if (sd_notify_flag) {
68-
flux_future_t *f;
69-
char buf[64];
70-
71-
snprintf (buf,
72-
sizeof (buf),
73-
"flux-dump(1) has archived %d keys",
74-
keycount);
75-
f = flux_rpc_pack (h,
76-
"state-machine.sd-notify",
77-
FLUX_NODEID_ANY,
78-
FLUX_RPC_NORESPONSE,
79-
"{s:s}",
80-
"status", buf);
81-
flux_future_destroy (f);
82-
}
67+
flux_future_t *f;
68+
char buf[64];
69+
70+
snprintf (buf,
71+
sizeof (buf),
72+
"flux-dump(1) has archived %d keys",
73+
keycount);
74+
f = flux_rpc_pack (h,
75+
"state-machine.sd-notify",
76+
FLUX_NODEID_ANY,
77+
FLUX_RPC_NORESPONSE,
78+
"{s:s}",
79+
"status", buf);
80+
flux_future_destroy (f);
8381
}
8482

8583
static void progress (flux_t *h, int delta_keys)

0 commit comments

Comments
 (0)