]> mj.ucw.cz Git - libucw.git/commitdiff
strtonum: str_to_<signed> now implicitly allows signs
authorMartin Mares <mj@ucw.cz>
Fri, 27 Jan 2012 14:05:47 +0000 (15:05 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 27 Jan 2012 14:05:47 +0000 (15:05 +0100)
ucw/strtonum.h

index fd7e87b196a9e10c059963e2959953700ae34412..b16bd29ddc740413288c3015d8644abc070d7e34 100644 (file)
@@ -39,7 +39,7 @@ const char *str_to_##suffix(type *num, const char *str, const char **next, const
 #define STN_SIGNED_CONVERTOR(type, suffix, usuffix)                                                       \
 static inline const char *str_to_##suffix(type *num, const char *str, const char **next, const uns flags) \
 {                                                                                                         \
-  return str_to_##usuffix((void *) num, str, next, flags | STN_SIGNED);                                   \
+  return str_to_##usuffix((void *) num, str, next, flags | STN_SIGNED | STN_PLUS | STN_MINUS);            \
 }
 
 STN_DECLARE_CONVERTOR(uns, uns);