procd: increase watchdog fd_buf storage size to fix gcc8 build error
[project/procd.git] / watchdog.c
index ec10ba6188ca39138a46b805becc91a18ba2c059..7493a0f51b3b0e244d918aa1b3505cf522f61b9a 100644 (file)
@@ -142,10 +142,11 @@ int watchdog_frequency(int frequency)
 
 char* watchdog_fd(void)
 {
-       static char fd_buf[3];
+       static char fd_buf[12];
 
        if (wdt_fd < 0)
                return NULL;
+
        snprintf(fd_buf, sizeof(fd_buf), "%d", wdt_fd);
 
        return fd_buf;