[
https://issues.apache.org/jira/browse/AXIS2C-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1508.
-------------------------------------
Resolution: Fixed
The functions were never used anywhere in the
codebase - all code uses the standard library strtol() directly.
Removed dead code from AXIS2C-1508:
- axutil_strtol() and axutil_strtoul() functions from util/src/types.c
(42 lines)
- AXIS2_STRTOL and AXIS2_STRTOUL macros from
util/include/axutil_types.h (17 lines)
Total: 59 lines deleted
> function axutil_strtol in util/src/types.c can't convert negative number from
> string.('-32134556' will be converted to 0)
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2C-1508
> URL: https://issues.apache.org/jira/browse/AXIS2C-1508
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: 1.6.0
> Environment: all envireonments
> Reporter: zengxianrui-
> Priority: Major
> Labels: patch
> Attachments: axis2c-src-1.6.0-7.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> you will know this problem when you look at this function, if input parameter
> s is '-1234567', then first char is '-', the for loop will breaks, the this
> function return 0 to you.
> the function is :
> AXIS2_EXTERN int64_t AXIS2_CALL
> axutil_strtol(
> const char *s,
> char **endptr,
> int base)
> {
> int i;
> int64_t n;
> n = 0;
> for (i = 0; s[i] >= '0' && s[i] <= '9'; ++i)
> {
> n = 10 * n + (s[i] - '0');
> }
> if(endptr != NULL)
> {
> *endptr = (char *)(s + i);
> }
> return n;
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]