Skip to content
Myr

Fix warning about environ

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nicolas Williams · committed by Nicolas Williams · parent 9a0d796 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/builtin.c+1 added-1 removed
1018 unmodified lines
1019static jv f_env(jq_state *jq, jv input) {1020 jv_free(input);1021 jv env = jv_object();1022 const char *var, *val;1023 for (const char **e = environ; *e != NULL; e++) {1023 for (char **e = environ; *e != NULL; e++) {1024 var = e[0];1025 val = strchr(e[0], '=');1026 if (val == NULL)1027 env = jv_object_set(env, jv_string(var), jv_null());
600 unmodified lines