dovecot-2.2: lib: strnum - add permissive str_parse_uint() helper
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 2 15:23:26 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/2051de7285c4
changeset: 17562:2051de7285c4
user: Phil Carmody <phil at dovecot.fi>
date: Wed Jul 02 18:21:24 2014 +0300
description:
lib: strnum - add permissive str_parse_uint() helper
Signed-off-by: Phil Carmody <phil at dovecot.fi>
diffstat:
src/lib/strnum.c | 1 +
src/lib/strnum.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r 439bba739c49 -r 2051de7285c4 src/lib/strnum.c
--- a/src/lib/strnum.c Wed Jul 02 18:21:24 2014 +0300
+++ b/src/lib/strnum.c Wed Jul 02 18:21:24 2014 +0300
@@ -122,6 +122,7 @@
return 0; \
}
STR_TO_U__TEMPLATE(str_parse_uoff, uoff_t)
+STR_TO_U__TEMPLATE(str_parse_uint, unsigned int)
int str_to_int(const char *str, int *num_r)
{
diff -r 439bba739c49 -r 2051de7285c4 src/lib/strnum.h
--- a/src/lib/strnum.h Wed Jul 02 18:21:24 2014 +0300
+++ b/src/lib/strnum.h Wed Jul 02 18:21:24 2014 +0300
@@ -14,6 +14,7 @@
*/
int str_to_uint(const char *str, unsigned int *num_r) ATTR_WARN_UNUSED_RESULT;
+int str_parse_uint(const char *str, unsigned int *num_r, const char **endp_r) ATTR_WARN_UNUSED_RESULT ATTR_NULL(3);
int str_to_ulong(const char *str, unsigned long *num_r) ATTR_WARN_UNUSED_RESULT;
int str_to_ullong(const char *str, unsigned long long *num_r) ATTR_WARN_UNUSED_RESULT;
int str_to_uint32(const char *str, uint32_t *num_r) ATTR_WARN_UNUSED_RESULT;
More information about the dovecot-cvs
mailing list