update all uses of ABS_PATH
authorJim Meyering <meyering@redhat.com>
Mon, 10 Aug 2009 17:03:36 +0000 (19:03 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 13 Aug 2009 12:45:34 +0000 (14:45 +0200)
run this command:
  git grep -l -w ABS_PATH|xargs perl -pi -e \
    's/(?:ABS_PATH)( \(.*?,) (.*?)\)/ABS_PATH$1 return $2)/'

29 files changed:
daemon/augeas.c
daemon/checksum.c
daemon/cmp.c
daemon/cpmv.c
daemon/dir.c
daemon/du.c
daemon/fallocate.c
daemon/file.c
daemon/find.c
daemon/glob.c
daemon/grep.c
daemon/grub.c
daemon/headtail.c
daemon/hexdump.c
daemon/initrd.c
daemon/inotify.c
daemon/link.c
daemon/ls.c
daemon/mknod.c
daemon/mount.c
daemon/readdir.c
daemon/realpath.c
daemon/scrub.c
daemon/stat.c
daemon/strings.c
daemon/swap.c
daemon/tar.c
daemon/wc.c
daemon/xattr.c

index 79d41a4..45f86cf 100644 (file)
@@ -55,7 +55,7 @@ do_aug_init (char *root, int flags)
   char *buf;
 
   NEED_ROOT (-1);
   char *buf;
 
   NEED_ROOT (-1);
-  ABS_PATH (root, -1);
+  ABS_PATH (root, return -1);
 
   if (aug) {
     aug_close (aug);
 
   if (aug) {
     aug_close (aug);
@@ -350,7 +350,7 @@ do_aug_ls (char *path)
 
   NEED_AUG (NULL);
 
 
   NEED_AUG (NULL);
 
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   len = strlen (path);
 
 
   len = strlen (path);
 
index bd71182..d12413f 100644 (file)
@@ -37,7 +37,7 @@ do_checksum (char *csumtype, char *path)
   int len;
 
   NEED_ROOT (NULL);
   int len;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   if (strcasecmp (csumtype, "crc") == 0)
     program = "cksum";
 
   if (strcasecmp (csumtype, "crc") == 0)
     program = "cksum";
index a2d92a3..30574e2 100644 (file)
@@ -35,8 +35,8 @@ do_equal (char *file1, char *file2)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (file1, -1);
-  ABS_PATH (file2, -1);
+  ABS_PATH (file1, return -1);
+  ABS_PATH (file2, return -1);
 
   file1buf = sysroot_path (file1);
   if (file1buf == NULL) {
 
   file1buf = sysroot_path (file1);
   if (file1buf == NULL) {
index 289a2da..37f1219 100644 (file)
@@ -53,8 +53,8 @@ cpmv_cmd (const char *cmd, const char *flags, const char *src, const char *dest)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (src, -1);
-  ABS_PATH (dest, -1);
+  ABS_PATH (src, return -1);
+  ABS_PATH (dest, return -1);
 
   srcbuf = sysroot_path (src);
   if (srcbuf == NULL) {
 
   srcbuf = sysroot_path (src);
   if (srcbuf == NULL) {
index 5945862..20cbd24 100644 (file)
@@ -35,7 +35,7 @@ do_rmdir (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = rmdir (path);
 
   CHROOT_IN;
   r = rmdir (path);
@@ -60,7 +60,7 @@ do_rm_rf (char *path)
   char *buf, *err;
 
   NEED_ROOT (-1);
   char *buf, *err;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   if (strcmp (path, "/") == 0) {
     reply_with_error ("rm -rf: cannot remove root directory");
 
   if (strcmp (path, "/") == 0) {
     reply_with_error ("rm -rf: cannot remove root directory");
@@ -94,7 +94,7 @@ do_mkdir (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = mkdir (path, 0777);
 
   CHROOT_IN;
   r = mkdir (path, 0777);
@@ -160,7 +160,7 @@ do_mkdir_p (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = recursive_mkdir (path);
 
   CHROOT_IN;
   r = recursive_mkdir (path);
@@ -181,7 +181,7 @@ do_is_dir (char *path)
   struct stat buf;
 
   NEED_ROOT (-1);
   struct stat buf;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = lstat (path, &buf);
 
   CHROOT_IN;
   r = lstat (path, &buf);
@@ -205,7 +205,7 @@ do_mkdtemp (char *template)
   char *r;
 
   NEED_ROOT (NULL);
   char *r;
 
   NEED_ROOT (NULL);
-  ABS_PATH (template, NULL);
+  ABS_PATH (template, return NULL);
 
   CHROOT_IN;
   r = mkdtemp (template);
 
   CHROOT_IN;
   r = mkdtemp (template);
index 735132a..7d9c663 100644 (file)
@@ -37,7 +37,7 @@ do_du (char *path)
   char *buf;
 
   NEED_ROOT (-1);
   char *buf;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
index 47e84c6..f61c496 100644 (file)
@@ -33,7 +33,7 @@ do_fallocate (char *path, int len)
   int fd, r;
 
   NEED_ROOT (-1);
   int fd, r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_NOCTTY, 0666);
 
   CHROOT_IN;
   fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_NOCTTY, 0666);
index d2ada99..e185132 100644 (file)
@@ -36,7 +36,7 @@ do_touch (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   fd = open (path, O_WRONLY | O_CREAT | O_NOCTTY, 0666);
 
   CHROOT_IN;
   fd = open (path, O_WRONLY | O_CREAT | O_NOCTTY, 0666);
@@ -148,7 +148,7 @@ do_read_lines (char *path)
   ssize_t n;
 
   NEED_ROOT (NULL);
   ssize_t n;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   fp = fopen (path, "r");
 
   CHROOT_IN;
   fp = fopen (path, "r");
@@ -195,7 +195,7 @@ do_rm (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = unlink (path);
 
   CHROOT_IN;
   r = unlink (path);
@@ -215,7 +215,7 @@ do_chmod (int mode, char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = chmod (path, mode);
 
   CHROOT_IN;
   r = chmod (path, mode);
@@ -235,7 +235,7 @@ do_chown (int owner, int group, char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = chown (path, owner, group);
 
   CHROOT_IN;
   r = chown (path, owner, group);
@@ -255,7 +255,7 @@ do_exists (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = access (path, F_OK);
 
   CHROOT_IN;
   r = access (path, F_OK);
@@ -271,7 +271,7 @@ do_is_file (char *path)
   struct stat buf;
 
   NEED_ROOT (-1);
   struct stat buf;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = lstat (path, &buf);
 
   CHROOT_IN;
   r = lstat (path, &buf);
@@ -295,7 +295,7 @@ do_write_file (char *path, char *content, int size)
   int fd;
 
   NEED_ROOT (-1);
   int fd;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   if (size == 0)
     size = strlen (content);
 
   if (size == 0)
     size = strlen (content);
@@ -331,7 +331,7 @@ do_read_file (char *path, size_t *size_r)
   char *r;
 
   NEED_ROOT (NULL);
   char *r;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   fd = open (path, O_RDONLY);
 
   CHROOT_IN;
   fd = open (path, O_RDONLY);
@@ -445,7 +445,7 @@ do_zfile (char *method, char *path)
   char line[256];
 
   NEED_ROOT (NULL);
   char line[256];
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   if (strcmp (method, "gzip") == 0 || strcmp (method, "compress") == 0)
     zcat = "zcat";
 
   if (strcmp (method, "gzip") == 0 || strcmp (method, "compress") == 0)
     zcat = "zcat";
index 40f1b3b..c514177 100644 (file)
@@ -60,7 +60,7 @@ do_find (char *dir)
   char str[PATH_MAX];
 
   NEED_ROOT (NULL);
   char str[PATH_MAX];
 
   NEED_ROOT (NULL);
-  ABS_PATH (dir, NULL);
+  ABS_PATH (dir, return NULL);
 
   sysrootdir = sysroot_path (dir);
   if (!sysrootdir) {
 
   sysrootdir = sysroot_path (dir);
   if (!sysrootdir) {
index f15d5e5..1c47ba5 100644 (file)
@@ -32,7 +32,7 @@ do_glob_expand (char *pattern)
   glob_t buf;
 
   NEED_ROOT (NULL);
   glob_t buf;
 
   NEED_ROOT (NULL);
-  ABS_PATH (pattern, NULL);    /* Required so chroot can be used. */
+  ABS_PATH (pattern, return NULL);     /* Required so chroot can be used. */
 
   /* glob(3) in glibc never calls chdir, so this seems to be safe: */
   CHROOT_IN;
 
   /* glob(3) in glibc never calls chdir, so this seems to be safe: */
   CHROOT_IN;
index c51dc0b..19e4683 100644 (file)
@@ -36,7 +36,7 @@ grep (const char *prog, const char *flag, char *regex, char *path)
   char **lines;
 
   NEED_ROOT (NULL);
   char **lines;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
index 118771f..8fcd911 100644 (file)
@@ -33,7 +33,7 @@ do_grub_install (char *root, char *device)
   char *buf;
 
   NEED_ROOT (-1);
   char *buf;
 
   NEED_ROOT (-1);
-  ABS_PATH (root, -1);
+  ABS_PATH (root, return -1);
   RESOLVE_DEVICE (device, return -1);
 
   if (asprintf_nowarn (&buf, "--root-directory=%R", root) == -1) {
   RESOLVE_DEVICE (device, return -1);
 
   if (asprintf_nowarn (&buf, "--root-directory=%R", root) == -1) {
index af2648c..bdd0f49 100644 (file)
@@ -36,7 +36,7 @@ headtail (const char *prog, const char *flag, const char *n, char *path)
   char **lines;
 
   NEED_ROOT (NULL);
   char **lines;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
index e2d8300..27ea108 100644 (file)
@@ -33,7 +33,7 @@ do_hexdump (char *path)
   char *out, *err;
 
   NEED_ROOT (NULL);
   char *out, *err;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   buf = sysroot_path (path);
   if (!buf) {
 
   buf = sysroot_path (path);
   if (!buf) {
index 59749bb..e703481 100644 (file)
@@ -38,7 +38,7 @@ do_initrd_list (char *path)
   size_t len;
 
   NEED_ROOT (NULL);
   size_t len;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   /* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
   if (asprintf_nowarn (&cmd, "zcat %R | cpio --quiet -it", path) == -1) {
 
   /* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
   if (asprintf_nowarn (&cmd, "zcat %R | cpio --quiet -it", path) == -1) {
index 8bb8ed2..2f22f52 100644 (file)
@@ -129,7 +129,7 @@ do_inotify_add_watch (char *path, int mask)
   char *buf;
 
   NEED_INOTIFY (-1);
   char *buf;
 
   NEED_INOTIFY (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   buf = sysroot_path (path);
   if (!buf) {
 
   buf = sysroot_path (path);
   if (!buf) {
index 29ae679..bf616ed 100644 (file)
@@ -35,7 +35,7 @@ do_readlink (char *path)
   char link[PATH_MAX];
 
   NEED_ROOT (NULL);
   char link[PATH_MAX];
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   r = readlink (path, link, sizeof link);
 
   CHROOT_IN;
   r = readlink (path, link, sizeof link);
@@ -63,7 +63,7 @@ _link (const char *flag, int symbolic, const char *target, const char *linkname)
   char *buf_target;
 
   NEED_ROOT (-1);
   char *buf_target;
 
   NEED_ROOT (-1);
-  ABS_PATH (linkname, -1);
+  ABS_PATH (linkname, return -1);
   /* but target does not need to be absolute */
 
   /* Prefix linkname with sysroot. */
   /* but target does not need to be absolute */
 
   /* Prefix linkname with sysroot. */
index e2ca55f..8ae150b 100644 (file)
@@ -38,7 +38,7 @@ do_ls (char *path)
   struct dirent *d;
 
   NEED_ROOT (NULL);
   struct dirent *d;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   dir = opendir (path);
 
   CHROOT_IN;
   dir = opendir (path);
index 315ea7d..ab799cd 100644 (file)
@@ -36,7 +36,7 @@ do_mknod (int mode, int devmajor, int devminor, char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = mknod (path, mode, makedev (devmajor, devminor));
 
   CHROOT_IN;
   r = mknod (path, mode, makedev (devmajor, devminor));
index 6c30304..8cf6874 100644 (file)
@@ -320,7 +320,7 @@ do_mount_loop (char *file, char *mountpoint)
   char *error;
 
   NEED_ROOT (-1);
   char *error;
 
   NEED_ROOT (-1);
-  ABS_PATH (file, -1);
+  ABS_PATH (file, return -1);
 
   /* We have to prefix /sysroot on both the filename and the mountpoint. */
   mp = sysroot_path (mountpoint);
 
   /* We have to prefix /sysroot on both the filename and the mountpoint. */
   mp = sysroot_path (mountpoint);
@@ -358,7 +358,7 @@ do_mkmountpoint (char *path)
   int r;
 
   /* NEED_ROOT (-1); - we don't want this test for this call. */
   int r;
 
   /* NEED_ROOT (-1); - we don't want this test for this call. */
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = mkdir (path, 0777);
 
   CHROOT_IN;
   r = mkdir (path, 0777);
@@ -383,7 +383,7 @@ do_rmmountpoint (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   CHROOT_IN;
   r = rmdir (path);
 
   CHROOT_IN;
   r = rmdir (path);
index 17fc619..f8f95d2 100644 (file)
@@ -37,7 +37,7 @@ do_readdir (char *path)
   int i;
 
   NEED_ROOT (NULL);
   int i;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   ret = malloc (sizeof *ret);
   if (ret == NULL) {
 
   ret = malloc (sizeof *ret);
   if (ret == NULL) {
index 9ab478d..18adc85 100644 (file)
@@ -33,7 +33,7 @@ do_realpath (char *path)
   char *ret;
 
   NEED_ROOT (NULL);
   char *ret;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   ret = realpath (path, NULL);
 
   CHROOT_IN;
   ret = realpath (path, NULL);
index 3c22b66..f1601f9 100644 (file)
@@ -55,7 +55,7 @@ do_scrub_file (char *file)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (file, -1);
+  ABS_PATH (file, return -1);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (file);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (file);
@@ -85,7 +85,7 @@ do_scrub_freespace (char *dir)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (dir, -1);
+  ABS_PATH (dir, return -1);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (dir);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (dir);
index da360ce..da2d274 100644 (file)
@@ -38,7 +38,7 @@ do_stat (char *path)
   struct stat statbuf;
 
   NEED_ROOT (NULL);
   struct stat statbuf;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   r = stat (path, &statbuf);
 
   CHROOT_IN;
   r = stat (path, &statbuf);
@@ -80,7 +80,7 @@ do_lstat (char *path)
   struct stat statbuf;
 
   NEED_ROOT (NULL);
   struct stat statbuf;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   r = lstat (path, &statbuf);
 
   CHROOT_IN;
   r = lstat (path, &statbuf);
@@ -122,7 +122,7 @@ do_statvfs (char *path)
   struct statvfs statbuf;
 
   NEED_ROOT (NULL);
   struct statvfs statbuf;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   r = statvfs (path, &statbuf);
 
   CHROOT_IN;
   r = statvfs (path, &statbuf);
index c0e073f..89e04a8 100644 (file)
@@ -34,7 +34,7 @@ do_strings_e (char *encoding, char *path)
   char **lines;
 
   NEED_ROOT (NULL);
   char **lines;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   buf = sysroot_path (path);
   if (!buf) {
 
   buf = sysroot_path (path);
   if (!buf) {
index c9104e1..bb1706f 100644 (file)
@@ -80,7 +80,7 @@ do_mkswap_file (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   buf = sysroot_path (path);
   if (!buf) {
 
   buf = sysroot_path (path);
   if (!buf) {
@@ -138,7 +138,7 @@ do_swapon_file (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   buf = sysroot_path (path);
   if (!buf) {
 
   buf = sysroot_path (path);
   if (!buf) {
@@ -158,7 +158,7 @@ do_swapoff_file (char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   buf = sysroot_path (path);
   if (!buf) {
 
   buf = sysroot_path (path);
   if (!buf) {
index 39b983c..e1ff9b6 100644 (file)
@@ -107,7 +107,7 @@ do_tar_out (char *dir)
   char buf[GUESTFS_MAX_CHUNK_SIZE];
 
   NEED_ROOT (-1);
   char buf[GUESTFS_MAX_CHUNK_SIZE];
 
   NEED_ROOT (-1);
-  ABS_PATH (dir, -1);
+  ABS_PATH (dir, return -1);
 
   /* "tar -C /sysroot%s -cf - ." but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -cf - .", dir) == -1) {
 
   /* "tar -C /sysroot%s -cf - ." but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -cf - .", dir) == -1) {
@@ -229,7 +229,7 @@ do_tgz_out (char *dir)
   char buf[GUESTFS_MAX_CHUNK_SIZE];
 
   NEED_ROOT (-1);
   char buf[GUESTFS_MAX_CHUNK_SIZE];
 
   NEED_ROOT (-1);
-  ABS_PATH (dir, -1);
+  ABS_PATH (dir, return -1);
 
   /* "tar -C /sysroot%s -zcf - ." but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -zcf - .", dir) == -1) {
 
   /* "tar -C /sysroot%s -zcf - ." but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -zcf - .", dir) == -1) {
index 4878b57..0917eb9 100644 (file)
@@ -35,7 +35,7 @@ wc (char *flag, char *path)
   int r;
 
   NEED_ROOT (-1);
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (path, -1);
+  ABS_PATH (path, return -1);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (path);
index a908a44..88947b2 100644 (file)
@@ -117,7 +117,7 @@ getxattrs (char *path,
   guestfs_int_xattr_list *r = NULL;
 
   NEED_ROOT (NULL);
   guestfs_int_xattr_list *r = NULL;
 
   NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  ABS_PATH (path, return NULL);
 
   CHROOT_IN;
   len = listxattr (path, NULL, 0);
 
   CHROOT_IN;
   len = listxattr (path, NULL, 0);