Skip to content

Commit

Permalink
parcall: simplify usage print
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Feb 7, 2025
1 parent 6644f97 commit 9c35b63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/parcall/parcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static int cmd_mkpar(struct re_printf *pf, void *arg)
const char *usage = "usage: /mkpar <name>\n";

if (!str_isset(carg->prm)) {
(void)re_hprintf(pf, "%s", usage);
(void)re_hprintf(pf, usage);
return EINVAL;
}

Expand Down Expand Up @@ -335,7 +335,7 @@ static int cmd_rmpar(struct re_printf *pf, void *arg)
const char *usage = "usage: /rmpar <name>\n";

if (!str_isset(carg->prm)) {
(void)re_hprintf(pf, "%s", usage);
(void)re_hprintf(pf, usage);
return EINVAL;
}

Expand Down Expand Up @@ -400,12 +400,12 @@ static int cmd_paradd(struct re_printf *pf, void *arg)
}

if (err) {
(void)re_hprintf(pf, "%s", usage);
(void)re_hprintf(pf, usage);
return err;
}

if (!pl_isset(&name) || !pl_isset(&addr)) {
(void)re_hprintf(pf, "%s", usage);
(void)re_hprintf(pf, usage);
return EINVAL;
}

Expand Down Expand Up @@ -488,7 +488,7 @@ static int cmd_parcall(struct re_printf *pf, void *arg)
" inactive at the same time\n";

if (!str_isset(carg->prm)) {
(void)re_hprintf(pf, "%s", usage);
(void)re_hprintf(pf, usage);
return EINVAL;
}

Expand All @@ -514,7 +514,7 @@ static int cmd_parcall(struct re_printf *pf, void *arg)
callarg.adir = sdp_dir_decode(&pldir[0]);
callarg.vdir = sdp_dir_decode(&pldir[1]);
if (callarg.adir == SDP_INACTIVE && callarg.vdir == SDP_INACTIVE) {
(void)re_hprintf(pf, "%s", usage);
(void)re_hprintf(pf, usage);
return EINVAL;
}

Expand Down

0 comments on commit 9c35b63

Please sign in to comment.