Skip to content

Commit

Permalink
drivers/upsdrvctl.c: status_driver(): no need to check for NULLness o…
Browse files Browse the repository at this point in the history
…f conn->buf [#2567]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 31, 2024
1 parent 44633fe commit f2871f5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/upsdrvctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,6 @@ static void status_driver(const ups_t *ups)

if (upsdrvquery_write(conn, "GETPID\n") >= 0
&& (qretPid = upsdrvquery_read_timeout(conn, tv)) >= 1
&& conn->buf
&& (!strncmp(conn->buf, "PID ", 4))
) {
size_t l;
Expand All @@ -884,7 +883,6 @@ static void status_driver(const ups_t *ups)

if (upsdrvquery_write(conn, "DUMPSTATUS\n") >= 0
&& (qretStatus = upsdrvquery_read_timeout(conn, tv)) >= 1
&& conn->buf
) {
char *buf;

Expand Down

0 comments on commit f2871f5

Please sign in to comment.