aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swaybar/status_line.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index a97f3525..2e9bb7f1 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -117,11 +117,11 @@ bool status_handle_readable(struct status_line *status) {
status->text = status->buffer;
// intentional fall-through
case PROTOCOL_TEXT:
- errno = 0;
while (true) {
if (status->buffer[read_bytes - 1] == '\n') {
status->buffer[read_bytes - 1] = '\0';
}
+ errno = 0;
read_bytes = getline(&status->buffer,
&status->buffer_size, status->read);
if (errno == EAGAIN) {