summaryrefslogtreecommitdiff
path: root/src/basic/hexdecoct.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-03-03 13:07:10 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-03-05 07:10:13 +0900
commitf5fbe71d956957ca7ceb6777aed05a416fc83a43 (patch)
tree67358d417604030867a979f216bbb79939a37844 /src/basic/hexdecoct.c
parentef1e0b9a461c4baa12bdda47579c2c017209c3be (diff)
downloadsystemd-f5fbe71d956957ca7ceb6777aed05a416fc83a43.tar.gz
tree-wide: use UINT64_MAX or friends
Diffstat (limited to 'src/basic/hexdecoct.c')
-rw-r--r--src/basic/hexdecoct.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c
index da60202e57..cb0104670f 100644
--- a/src/basic/hexdecoct.c
+++ b/src/basic/hexdecoct.c
@@ -119,7 +119,7 @@ int unhexmem_full(const char *p, size_t l, bool secure, void **ret, size_t *ret_
assert(ret_len);
assert(p || l == 0);
- if (l == (size_t) -1)
+ if (l == SIZE_MAX)
l = strlen(p);
/* Note that the calculation of memory size is an upper boundary, as we ignore whitespace while decoding */
@@ -309,7 +309,7 @@ int unbase32hexmem(const char *p, size_t l, bool padding, void **mem, size_t *_l
assert(mem);
assert(_len);
- if (l == (size_t) -1)
+ if (l == SIZE_MAX)
l = strlen(p);
/* padding ensures any base32hex input has input divisible by 8 */
@@ -708,7 +708,7 @@ int unbase64mem_full(const char *p, size_t l, bool secure, void **ret, size_t *r
assert(ret);
assert(ret_size);
- if (l == (size_t) -1)
+ if (l == SIZE_MAX)
l = strlen(p);
/* A group of four input bytes needs three output bytes, in case of padding we need to add two or three extra