FS-2216 partial with renaming

This commit is contained in:
Jeff Lenk
2012-01-08 14:19:16 -06:00
parent bcf7d477e2
commit 24288832b1
16 changed files with 52 additions and 67 deletions

View File

@@ -2921,6 +2921,20 @@ SWITCH_DECLARE(char *) switch_format_number(const char *num)
}
SWITCH_DECLARE(unsigned int) switch_atoui(const char *nptr)
{
int tmp = atoi(nptr);
if (tmp < 0) return 0;
else return (unsigned int) tmp;
}
SWITCH_DECLARE(unsigned long) switch_atoul(const char *nptr)
{
long tmp = atol(nptr);
if (tmp < 0) return 0;
else return (unsigned long) tmp;
}
/* For Emacs:
* Local Variables:
* mode:c