commit 0c6f37394be1fefc72c0bbc9c507fa768d9227a0
parent aaa6173641bad1e3f9732e97cbbcf7a5f60bd950
Author: sin <sin@2f30.org>
Date: Mon, 17 Oct 2016 16:53:28 +0100
Use LINE_MAX instead of BUFSIZ for the status buffer
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/spoon.c b/spoon.c
@@ -1,4 +1,5 @@
#include <err.h>
+#include <limits.h>
#include <stdio.h>
#include <unistd.h>
@@ -35,7 +36,7 @@ dummyread(void *arg, char *buf, size_t len)
void
entcat(char *line, size_t len)
{
- char buf[BUFSIZ];
+ char buf[LINE_MAX];
char *s, *e;
struct ent *ent;
int ret, i;
@@ -53,7 +54,7 @@ entcat(char *line, size_t len)
void
loop(void)
{
- char line[BUFSIZ];
+ char line[LINE_MAX];
Display *dpy;
dpy = XOpenDisplay(NULL);