diff options
author | Simon McVittie <smcv@collabora.com> | 2022-04-24 11:04:58 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-04-24 11:04:58 +0100 |
commit | f65b05f2d540e8560fde374c206f872e24436e32 (patch) | |
tree | 79168c2f46496b95e1fbb4b30e9f7be68327d4f3 | |
parent | d78121a6997c833cf3c367b432f668551ee3ae1e (diff) | |
download | libglnx-f65b05f2d540e8560fde374c206f872e24436e32.tar.gz |
fdio: Match signedness of length parameter
This is documented as taking a length of -1, but the parameter is
unsigned, so it's more correctly ((gsize) -1). This silences a warning
from gcc -Wsign-compare.
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | glnx-fdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glnx-fdio.c b/glnx-fdio.c index c601f08..ee69aa1 100644 --- a/glnx-fdio.c +++ b/glnx-fdio.c @@ -1130,7 +1130,7 @@ glnx_file_replace_contents_with_perms_at (int dfd, &tmpf, error)) return FALSE; - if (len == -1) + if (len == (gsize) -1) len = strlen ((char*)buf); if (!glnx_try_fallocate (tmpf.fd, 0, len, error)) |