Browse Source

Fix type for write(2) return variable.

A little fix in xwrite().

>From 3727d2e334 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.
master
Quentin Rameau 9 years ago
committed by Roberto E. Vargas Caballero
parent
commit
4a193b9686
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      st.c

+ 2
- 1
st.c View File

@ -560,7 +560,8 @@ static int frclen = 0;
ssize_t ssize_t
xwrite(int fd, const char *s, size_t len) xwrite(int fd, const char *s, size_t len)
{ {
size_t aux = len, r;
size_t aux = len;
ssize_t r;
while (len > 0) { while (len > 0) {
r = write(fd, s, len); r = write(fd, s, len);


Loading…
Cancel
Save