summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq+hackers@fifth.space>2015-07-24 11:52:17 +0200
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2015-07-24 12:01:56 +0200
commit4a193b96862c8ed7147048592aa4a898b3c05b5b (patch)
tree3cb1248947b9c80931a84bb2956377d5b4180ace /st.c
parent1d348e98e3745ef98bf9fa36119ead6294c6c80b (diff)
Fix type for write(2) return variable.
A little fix in xwrite(). >From 3727d2e3344b57128ab51c7839795204f1f839ff Mon Sep 17 00:00:00 2001 From: Quentin Rameau <quinq@fifth.space> Date: Fri, 24 Jul 2015 11:40:46 +0200 Subject: [PATCH] Fix type for write(2) return variable. The allocated lengh of s fits into an integer so we can safely use ssize_t here.
Diffstat (limited to 'st.c')
-rw-r--r--st.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/st.c b/st.c
index b604f0e..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);