# endif
# define ROOT_LEN 3
#else
-#define IS_ABSOLUTE(n) (n[0] == '/')
-#define ROOT_LEN 1
+# define IS_ABSOLUTE(n) (n[0] == '/')
+# define ROOT_LEN 1
#endif
/* Return the absolute name of file NAME which does not contain any '.',
const char *start, *end, *apath_limit;
unsigned long root_len = ROOT_LEN;
- if (name[0] == '\0' || apath == NULL)
+ if (name[0] == '\0')
return NULL;
apath_limit = apath + GET_PATH_MAX;
if (STOP_SET (name[0], MAP_DIRSEP))
root_len = 1;
#endif
- strncpy (apath, name, root_len);
+ memcpy (apath, name, root_len);
apath[root_len] = '\0';
dest = apath + root_len;
/* Get past the root, since we already copied it. */