diff --git a/src/infopipe.c b/src/infopipe.c index ef93ad95..1049dfff 100644 --- a/src/infopipe.c +++ b/src/infopipe.c @@ -63,8 +63,9 @@ void *infopipe_thread_func(void *pvoid) int i,fd,runnable; fd_set readset; struct timeval tm; - char buf[2048],*pbuf; - infopipe_t items; + static char buf[2048]; /* such equal or exceed sizeof(infopipe_t) */ + static infopipe_t items; + char *pbuf; pvoid=(void*)pvoid; /* useless cast to avoid unused var warning */ @@ -92,9 +93,9 @@ void *infopipe_thread_func(void *pvoid) FD_ZERO(&readset); FD_SET(fd,&readset); - /* The select() below can block for a brief time (tm value) and is - ideally suited for a worker thread such as this. We don't want - to slow down ui updates in the main thread as there is already + /* The select() below can block for time tm and is ideally suited + for a worker thread such as this. We don't want to slow down + user interface updates in the main thread as there is already excess latency there. */ if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */ diff --git a/src/infopipe.h b/src/infopipe.h index 7425af53..ba5f7bcf 100644 --- a/src/infopipe.h +++ b/src/infopipe.h @@ -50,7 +50,7 @@ enum _infopipe_keys { }; /* 14 slots for the infopipe values */ -typedef char infopipe_t[14][256]; +typedef char infopipe_t[14][128]; /* Service routine for the conky main thread */ void update_infopipe(void);