summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2017-02-09 15:11:26 +0100
committerDominique Martinet <asmadeus@codewreck.org>2017-02-09 15:11:26 +0100
commit0af382d923b289f2c5256c5dd2527e6a5de3a79e (patch)
treed4600c5a76491bb736975faf54291dab5954bbf6
parent671a381abbe3dcb6ccd62a064757c482d135a9cd (diff)
fix uninitialized return value
-rw-r--r--tailburst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tailburst.c b/tailburst.c
index da72e38..0021d65 100644
--- a/tailburst.c
+++ b/tailburst.c
@@ -44,7 +44,7 @@ ssize_t fdgetline(int fd, struct getline_states *line) {
line->next = str+1;
str[0] = '\0';
pr_debug("next already buffered, %p %p: %s\n", str, line->cur, line->cur);
- return nread;
+ return str - line->cur;
}
/* No such luck, move current to base and read what we can */