Add FIXME about checking exit code for popen'd commands.
authorMartin Pool <mbp@samba.org>
Thu, 13 Feb 2003 04:46:55 +0000 (04:46 +0000)
committerMartin Pool <mbp@samba.org>
Thu, 13 Feb 2003 04:46:55 +0000 (04:46 +0000)
Fix typo.

source/lib/util_file.c

index 611e0e40be9deff25681ffc8fe51e09826d16bc1..4babab89310f23f076ca812c9b3c616466b4c9bc 100644 (file)
@@ -362,7 +362,7 @@ char *file_pload(char *syscmd, size_t *size)
        while ((n = read(fd, buf, sizeof(buf))) > 0) {
                tp = Realloc(p, total + n + 1);
                if (!tp) {
-                       DEBUG(0,("file_pload: failed to exand buffer!\n"));
+                       DEBUG(0,("file_pload: failed to expand buffer!\n"));
                        close(fd);
                        SAFE_FREE(p);
                        return NULL;
@@ -372,6 +372,9 @@ char *file_pload(char *syscmd, size_t *size)
        }
        if (p) p[total] = 0;
 
+       /* FIXME: Perhaps ought to check that the command completed
+        * successfully (returned 0); if not the data may be
+        * truncated. */
        sys_pclose(fd);
 
        if (size) *size = total;