generator.ml: new type, "Pathname"
[libguestfs.git] / daemon / readdir.c
index 38bc66e..45256b2 100644 (file)
@@ -1,5 +1,5 @@
 /* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc. 
+ * Copyright (C) 2009 Red Hat Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -36,8 +36,8 @@ do_readdir (char *path)
   struct dirent *d;
   int i;
 
-  NEED_ROOT (NULL);
-  ABS_PATH (path, NULL);
+  NEED_ROOT (return NULL);
+  ABS_PATH (path, return NULL);
 
   ret = malloc (sizeof *ret);
   if (ret == NULL) {
@@ -63,7 +63,7 @@ do_readdir (char *path)
     guestfs_int_dirent *p;
 
     p = realloc (ret->guestfs_int_dirent_list_val,
-                sizeof (guestfs_int_dirent) * (i+1));
+                 sizeof (guestfs_int_dirent) * (i+1));
     v.name = strdup (d->d_name);
     if (!p || !v.name) {
       reply_with_perror ("allocate");