common.c: more strict address ariphmetic.

This commit is contained in:
Leonid Krivoshein 2018-04-22 15:31:04 +03:00
parent 08aefa7dde
commit a73ab0446a

View File

@ -11,7 +11,7 @@ int mkdir_dev(const char * name)
{
char pathname[PATH_MAX + 1] = "/dev/";
strcpy(pathname + 5, name);
strcpy(&pathname[5], name);
return (mkdir(pathname, 0755) == 0 || errno == EEXIST) ? 0 : -1;
}