Skip to content

Commit

Permalink
netsrv.c: replace ancient index(3) with strchr(3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakywumpus committed Jan 19, 2025
1 parent b8c3a18 commit abc3c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webfrontend/netsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static int SystemHandler(HttpdConnection_t *conn, void *unused)
BULLET BULLET BULLET BULLET;
/* Filter out only TERM and non-shell environment
variables of the form '*.*' ie. contain '.' */
if (!strcmp(t1, "TERM") || index(t1, '.'))
if (!strcmp(t1, "TERM") || strchr(t1, '.'))
httpdPrintf(conn, "%s \"%s\": \"%s\" ",
(o++) == 0 ? "" : ",",
t1, (t2 == NULL) ? "" : t2);
Expand Down

0 comments on commit abc3c7b

Please sign in to comment.