summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/utils.c b/utils.c
index 693273b..505790b 100644
--- a/utils.c
+++ b/utils.c
@@ -568,7 +568,6 @@ load_file_data (int fd,
ssize_t data_read;
ssize_t data_len;
ssize_t res;
- int errsv;
data_read = 0;
data_len = 4080;
@@ -587,12 +586,7 @@ load_file_data (int fd,
while (res < 0 && errno == EINTR);
if (res < 0)
- {
- errsv = errno;
- close (fd);
- errno = errsv;
- return NULL;
- }
+ return NULL;
data_read += res;
}
@@ -672,7 +666,7 @@ ensure_dir (const char *path,
/* Sets errno on error (!= 0) */
int
mkdir_with_parents (const char *pathname,
- int mode,
+ mode_t mode,
bool create_last)
{
cleanup_free char *fn = NULL;
@@ -815,7 +809,7 @@ readlink_malloc (const char *pathname)
if (n < 0)
return NULL;
}
- while (size - 2 < n);
+ while (size - 2 < (size_t)n);
value[n] = 0;
return steal_pointer (&value);