X-Git-Url: https://git.xinqibao.xyz/st.git/blobdiff_plain/d032b6159719b2fbbbd550781b378ca79a25d3a2..4a193b96862c8ed7147048592aa4a898b3c05b5b:/st.c?ds=inline diff --git a/st.c b/st.c index 64e2cec..f53378c 100644 --- a/st.c +++ b/st.c @@ -560,7 +560,8 @@ static int frclen = 0; ssize_t xwrite(int fd, const char *s, size_t len) { - size_t aux = len, r; + size_t aux = len; + ssize_t r; while (len > 0) { r = write(fd, s, len); @@ -1329,9 +1330,8 @@ execsh(void) die("who are you?\n"); } - if (!(sh = getenv("SHELL"))) { + if ((sh = getenv("SHELL")) == NULL) sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; - } if (opt_cmd) prog = opt_cmd[0];