Skip to content

Commit

Permalink
drivers/powerman-pdu.c: use same enum type for two variants of result
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jan 28, 2025
1 parent 05e7131 commit d893ecb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/powerman-pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ static int instcmd(const char *cmdname, const char *extra)
/* Power on the outlet */
if (!strcasecmp(cmdsuffix, "on")) {
rv = pm_node_on(pm, outletname);
return (rv==PM_ESUCCESS)?STAT_INSTCMD_HANDLED:STAT_SET_INVALID;
return (rv==PM_ESUCCESS)?STAT_INSTCMD_HANDLED:STAT_INSTCMD_INVALID;
}

/* Power off the outlet */
if (!strcasecmp(cmdsuffix, "off")) {
rv = pm_node_off(pm, outletname);
return (rv==PM_ESUCCESS)?STAT_INSTCMD_HANDLED:STAT_SET_INVALID;
return (rv==PM_ESUCCESS)?STAT_INSTCMD_HANDLED:STAT_INSTCMD_INVALID;
}

/* Cycle the outlet */
if (!strcasecmp(cmdsuffix, "cycle")) {
rv = pm_node_cycle(pm, outletname);
return (rv==PM_ESUCCESS)?STAT_INSTCMD_HANDLED:STAT_SET_INVALID;
return (rv==PM_ESUCCESS)?STAT_INSTCMD_HANDLED:STAT_INSTCMD_INVALID;
}

upslogx(LOG_NOTICE, "instcmd: unknown command [%s] [%s]", cmdname, extra);
Expand Down

0 comments on commit d893ecb

Please sign in to comment.