summaryrefslogtreecommitdiff
path: root/src/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared.c')
-rw-r--r--src/shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared.c b/src/shared.c
index 093e766..bec0354 100644
--- a/src/shared.c
+++ b/src/shared.c
@@ -6,7 +6,7 @@
6#include <errno.h> 6#include <errno.h>
7#include <error.h> 7#include <error.h>
8 8
9static enum XALLOC_TYPE { 9enum XALLOC_TYPE {
10 XALLOC_INVAL, // Default when unset 10 XALLOC_INVAL, // Default when unset
11 11
12 XALLOC_MALLOC, 12 XALLOC_MALLOC,
@@ -120,7 +120,7 @@ int rwbuf(char **str, unsigned long int initsize, int fd) {
120int wwbuf(int fd, const unsigned char *buf, int len) { 120int wwbuf(int fd, const unsigned char *buf, int len) {
121 int total = 0; 121 int total = 0;
122 int left = len; 122 int left = len;
123 int n; 123 int n = -1;
124 124
125 while(total < len) { 125 while(total < len) {
126 if((n = write(fd, buf + total, left)) < 0) 126 if((n = write(fd, buf + total, left)) < 0)