#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <errno.h>
#include <time.h>
#include <ctype.h>
#include <stdarg.h>
base = path_last_sep(name);
- strncpy(buf, base ? base + 1 : name, sizeof (buf));
+ strncpy(buf, base ? base + 1 : name, sizeof (buf) - 1);
/* Remove the suffix. */