use unsigned more consistently
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7261 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8ccad0a22f
commit
7cc21a90bd
|
@ -304,7 +304,7 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in);
|
||||||
\param arraylen the max number of elements in the array
|
\param arraylen the max number of elements in the array
|
||||||
\return the number of elements added to the array
|
\return the number of elements added to the array
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, int arraylen);
|
SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, unsigned int arraylen);
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str);
|
SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str);
|
||||||
SWITCH_DECLARE(char *) switch_strip_spaces(const char *str);
|
SWITCH_DECLARE(char *) switch_strip_spaces(const char *str);
|
||||||
|
|
|
@ -1072,7 +1072,7 @@ static char *cleanup_separated_string(char *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Separate a string using a delimiter that is not a space */
|
/* Separate a string using a delimiter that is not a space */
|
||||||
static unsigned int separate_string_char_delim(char *buf, char delim, char **array, int arraylen)
|
static unsigned int separate_string_char_delim(char *buf, char delim, char **array, unsigned int arraylen)
|
||||||
{
|
{
|
||||||
enum tokenizer_state {
|
enum tokenizer_state {
|
||||||
START,
|
START,
|
||||||
|
@ -1082,7 +1082,7 @@ static unsigned int separate_string_char_delim(char *buf, char delim, char **arr
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
char *ptr = buf;
|
char *ptr = buf;
|
||||||
int inside_quotes = 0;
|
int inside_quotes = 0;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
while (*ptr && count < arraylen) {
|
while (*ptr && count < arraylen) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
@ -1113,7 +1113,7 @@ static unsigned int separate_string_char_delim(char *buf, char delim, char **arr
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Separate a string using a delimiter that is a space */
|
/* Separate a string using a delimiter that is a space */
|
||||||
static unsigned int separate_string_blank_delim(char *buf, char **array, int arraylen)
|
static unsigned int separate_string_blank_delim(char *buf, char **array, unsigned int arraylen)
|
||||||
{
|
{
|
||||||
enum tokenizer_state {
|
enum tokenizer_state {
|
||||||
START,
|
START,
|
||||||
|
@ -1125,7 +1125,7 @@ static unsigned int separate_string_blank_delim(char *buf, char **array, int arr
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
char *ptr = buf;
|
char *ptr = buf;
|
||||||
int inside_quotes = 0;
|
int inside_quotes = 0;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
while (*ptr && count < arraylen) {
|
while (*ptr && count < arraylen) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
@ -1170,7 +1170,7 @@ static unsigned int separate_string_blank_delim(char *buf, char **array, int arr
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, int arraylen)
|
SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, unsigned int arraylen)
|
||||||
{
|
{
|
||||||
if (!buf || !array || !arraylen) {
|
if (!buf || !array || !arraylen) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue