Also, make "bufsize" const instead of static.
int read_audiod_pipe(int fd, void (*line_handler)(char *) )
{
int read_audiod_pipe(int fd, void (*line_handler)(char *) )
{
- static char buf[STRINGSIZE + 1];
- static ssize_t loaded, bufsize = sizeof(buf);
+ static char buf[STRINGSIZE];
+ const ssize_t bufsize = sizeof(buf) - 1;
+ static ssize_t loaded;
ssize_t ret;
if (loaded >= bufsize)
ssize_t ret;
if (loaded >= bufsize)