{
#ifdef HAVE_AUGEAS
char *buf;
- int len;
NEED_ROOT (-1);
- ABS_PATH (root, -1);
+ ABS_PATH (root, return -1);
if (aug) {
aug_close (aug);
aug = NULL;
}
- len = strlen (root) + 9;
- buf = malloc (len);
+ buf = sysroot_path (root);
if (!buf) {
reply_with_perror ("malloc");
return -1;
}
- snprintf (buf, len, "/sysroot%s", root);
aug = aug_init (buf, NULL, flags);
free (buf);
NEED_AUG (NULL);
- ABS_PATH (path, NULL);
+ ABS_PATH (path, return NULL);
len = strlen (path);