string_utils: use restrict for lxc_safe_int64_residual()

parent 90e69d71
......@@ -637,8 +637,9 @@ int lxc_safe_uint64(const char *numstr, uint64_t *converted, int base)
return 0;
}
int lxc_safe_int64_residual(const char *numstr, int64_t *converted, int base, char *residual,
size_t residual_len)
int lxc_safe_int64_residual(const char *restrict numstr,
int64_t *restrict converted, int base,
char *restrict residual, size_t residual_len)
{
char *remaining = NULL;
int64_t u;
......
......@@ -64,8 +64,10 @@ __hidden extern int lxc_safe_long(const char *numstr, long int *converted);
__hidden extern int lxc_safe_long_long(const char *numstr, long long int *converted);
__hidden extern int lxc_safe_ulong(const char *numstr, unsigned long *converted);
__hidden extern int lxc_safe_uint64(const char *numstr, uint64_t *converted, int base);
__hidden extern int lxc_safe_int64_residual(const char *numstr, int64_t *converted, int base,
char *residual, size_t residual_len);
__hidden extern int lxc_safe_int64_residual(const char *restrict numstr,
int64_t *restrict converted,
int base, char *restrict residual,
size_t residual_len);
/* Handles B, kb, MB, GB. Detects overflows and reports -ERANGE. */
__hidden extern int parse_byte_size_string(const char *s, long long int *converted);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment