Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fix type for write(2) return variable.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
64e2cec
..
f53378c
100644
(file)
--- 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)
{
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);
while (len > 0) {
r = write(fd, s, len);
@@
-1329,9
+1330,8
@@
execsh(void)
die("who are you?\n");
}
die("who are you?\n");
}
- if (
!(sh = getenv("SHELL"))) {
+ if (
(sh = getenv("SHELL")) == NULL)
sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
- }
if (opt_cmd)
prog = opt_cmd[0];
if (opt_cmd)
prog = opt_cmd[0];