diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-12 17:25:23 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-18 14:25:19 -0500 |
commit | 9c4615fb09f559642742d3698ecb5a430c698230 (patch) | |
tree | 2fc38309accc48f0a01c50c12e330ab5baa26f27 /src/basic/path-util.c | |
parent | b3267152783d5784c45010615045d4e8ee459da2 (diff) |
Use negative_errno() to assert errno is positive after a few system calls
This is not particularly intrusive because it happens in simple
utility functions. It helps gcc understand that error codes
are negative.
This gets a rid of most of the remaining warnings.
Diffstat (limited to 'src/basic/path-util.c')
-rw-r--r-- | src/basic/path-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 61fab0e087..4837bb2d7d 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -102,7 +102,7 @@ int path_make_absolute_cwd(const char *p, char **ret) { cwd = get_current_dir_name(); if (!cwd) - return -errno; + return negative_errno(); c = strjoin(cwd, "/", p, NULL); } |