Displaying 2 results from an estimated 2 matches for "baa5403".
Did you mean:
ba3a5603
2016 Mar 07
2
[PATCH v2] Use less stack.
...ntf (&buf, "%s/etc/XXXXXXXX", sysroot) == -1) {
+ reply_with_perror ("asprintf");
+ goto error;
+ }
if (random_name (buf) == -1) {
reply_with_perror ("random_name");
goto error;
diff --git a/daemon/tar.c b/daemon/tar.c
index 255a870..baa5403 100644
--- a/daemon/tar.c
+++ b/daemon/tar.c
@@ -45,12 +45,17 @@ optgroup_xz_available (void)
static int
is_chown_supported (const char *dir)
{
- size_t len = sysroot_len + strlen (dir) + 64;
- char buf[len];
+ CLEANUP_FREE char *buf = NULL;
int fd, r, err, saved_errno;
/* Create a ra...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...- if (!buf) {
- perror ("malloc");
- exit (EXIT_FAILURE);
- }
+ if (!buf)
+ error (EXIT_FAILURE, errno, "malloc");
xdrmem_create (&xdr, buf, GUESTFS_MESSAGE_MAX, XDR_ENCODE);
memset (&hdr, 0, sizeof hdr);
diff --git a/daemon/tar.c b/daemon/tar.c
index baa5403..6d0403a 100644
--- a/daemon/tar.c
+++ b/daemon/tar.c
@@ -23,6 +23,8 @@
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
+#include <error.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -110,10 +112,8 @@ read_error_fi...