X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=f53378cd25b4a9a463a8a681b44e8a5cc9619cf5;hb=4a193b96862c8ed7147048592aa4a898b3c05b5b;hp=c07cc3bbe50e020aa7b165d4e313669895935c71;hpb=684c72d05e54780c283c6580f271fb6920c3060d;p=st.git diff --git a/st.c b/st.c index c07cc3b..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]; @@ -4160,9 +4160,9 @@ run(void) do { XNextEvent(xw.dpy, &ev); /* - * XFilterEvent is required to be called after you using XOpenIM, - * this is not unnecessary.It does not only filter the key event, - * but some clientmessage for input method as well. + * This XFilterEvent call is required because of XOpenIM. It + * does filter out the key event and some client message for + * the input method too. */ if (XFilterEvent(&ev, None)) continue;