common.c: more strict address ariphmetic.
This commit is contained in:
parent
08aefa7dde
commit
a73ab0446a
2
common.c
2
common.c
@ -11,7 +11,7 @@ int mkdir_dev(const char * name)
|
|||||||
{
|
{
|
||||||
char pathname[PATH_MAX + 1] = "/dev/";
|
char pathname[PATH_MAX + 1] = "/dev/";
|
||||||
|
|
||||||
strcpy(pathname + 5, name);
|
strcpy(&pathname[5], name);
|
||||||
return (mkdir(pathname, 0755) == 0 || errno == EEXIST) ? 0 : -1;
|
return (mkdir(pathname, 0755) == 0 || errno == EEXIST) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user