iFix type for write(2) return variable. - st - Simple Terminal Err gopher.r-36.net 70 i Err gopher.r-36.net 70 1Log /scm/st//log.gph gopher.r-36.net 70 1Files /scm/st//files.gph gopher.r-36.net 70 1Refs /scm/st//refs.gph gopher.r-36.net 70 1README /scm/st//file/README.gph gopher.r-36.net 70 1LICENSE /scm/st//file/LICENSE.gph gopher.r-36.net 70 i--- Err gopher.r-36.net 70 1commit 4a193b96862c8ed7147048592aa4a898b3c05b5b /scm/st//commit/4a193b96862c8ed7147048592aa4a898b3c05b5b.gph gopher.r-36.net 70 1parent 1d348e98e3745ef98bf9fa36119ead6294c6c80b /scm/st//commit/1d348e98e3745ef98bf9fa36119ead6294c6c80b.gph gopher.r-36.net 70 hAuthor: Quentin Rameau URL:mailto:quinq+hackers@fifth.space gopher.r-36.net 70 iDate: Fri, 24 Jul 2015 11:52:17 +0200 Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iFix type for write(2) return variable. Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iA little fix in xwrite(). Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i>From 3727d2e3344b57128ab51c7839795204f1f839ff Mon Sep 17 00:00:00 2001 Err gopher.r-36.net 70 iFrom: Quentin Rameau Err gopher.r-36.net 70 iDate: Fri, 24 Jul 2015 11:40:46 +0200 Err gopher.r-36.net 70 iSubject: [PATCH] Fix type for write(2) return variable. Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iThe allocated lengh of s fits into an integer so we can safely use Err gopher.r-36.net 70 issize_t here. Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iDiffstat: Err gopher.r-36.net 70 i st.c | 3 ++- Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i1 file changed, 2 insertions(+), 1 deletion(-) Err gopher.r-36.net 70 i--- Err gopher.r-36.net 70 1diff --git a/st.c b/st.c /scm/st//file/st.c.gph gopher.r-36.net 70 i@@ -560,7 +560,8 @@ static int frclen = 0; Err gopher.r-36.net 70 i ssize_t Err gopher.r-36.net 70 i xwrite(int fd, const char *s, size_t len) Err gopher.r-36.net 70 i { Err gopher.r-36.net 70 i- size_t aux = len, r; Err gopher.r-36.net 70 i+ size_t aux = len; Err gopher.r-36.net 70 i+ ssize_t r; Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i while (len > 0) { Err gopher.r-36.net 70 i r = write(fd, s, len); Err gopher.r-36.net 70 .