comparison src/protocols/gg/utils.c @ 12225:078f39bdf3d4

[gaim-migrate @ 14527] Yet again, I managed to make a change after compiling and commit it without compiling again. Stupid! committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 25 Nov 2005 17:40:42 +0000
parents e84fbd0be612
children 508512caa22e
comparison
equal deleted inserted replaced
12224:e84fbd0be612 12225:078f39bdf3d4
28 uin_t ggp_str_to_uin(const char *str) 28 uin_t ggp_str_to_uin(const char *str)
29 { 29 {
30 char *tmp; 30 char *tmp;
31 long num; 31 long num;
32 32
33 if (!text) 33 if (!str)
34 return 0; 34 return 0;
35 35
36 errno = 0; 36 errno = 0;
37 num = strtol(text, &tmp, 10); 37 num = strtol(str, &tmp, 10);
38 38
39 if (*text == '\0' || *tmp != '\0') 39 if (*str == '\0' || *tmp != '\0')
40 return 0; 40 return 0;
41 41
42 if ((errno == ERANGE || (num == LONG_MAX || num == LONG_MIN)) 42 if ((errno == ERANGE || (num == LONG_MAX || num == LONG_MIN))
43 #if (LONG_MAX > UINT_MAX) 43 #if (LONG_MAX > UINT_MAX)
44 || num > (long)UINT_MAX 44 || num > (long)UINT_MAX