From 275f8f4581bb76e8914ecdb7acd92bacfa41be3f Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 13 Jan 2017 19:48:18 +0100 Subject: small conversion fixes around strtol and an uninitialized curl code --- src/curlhelper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/curlhelper.c') diff --git a/src/curlhelper.c b/src/curlhelper.c index a2d442f..8bcd898 100644 --- a/src/curlhelper.c +++ b/src/curlhelper.c @@ -77,12 +77,12 @@ int curlhelp_parse_statusline( char *buf, curlhelp_statusline *status_line ) { p = strtok( NULL, "." ); if( p == NULL ) { free( status_line->first_line ); return -1; } - status_line->http_major = strtol( p, &pp, 10 ); + status_line->http_major = (int)strtol( p, &pp, 10 ); if( *pp != '\0' ) { free( status_line->first_line ); return -1; } p = strtok( NULL, " " ); if( p == NULL ) { free( status_line->first_line ); return -1; } - status_line->http_minor = strtol( p, &pp, 10 ); + status_line->http_minor = (int)strtol( p, &pp, 10 ); if( *pp != '\0' ) { free( status_line->first_line ); return -1; } /* status code: "404" or "404.1", then SP */ @@ -92,14 +92,14 @@ int curlhelp_parse_statusline( char *buf, curlhelp_statusline *status_line ) { if( strchr( p, '.' ) != NULL ) { char *ppp; ppp = strtok( p, "." ); - status_line->http_code = strtol( ppp, &pp, 10 ); + status_line->http_code = (int)strtol( ppp, &pp, 10 ); if( *pp != '\0' ) { free( status_line->first_line ); return -1; } ppp = strtok( NULL, "" ); - status_line->http_subcode = strtol( ppp, &pp, 10 ); + status_line->http_subcode = (int)strtol( ppp, &pp, 10 ); if( *pp != '\0' ) { free( status_line->first_line ); return -1; } } else { - status_line->http_code = strtol( p, &pp, 10 ); + status_line->http_code = (int)strtol( p, &pp, 10 ); status_line->http_subcode = -1; if( *pp != '\0' ) { free( status_line->first_line ); return -1; } } -- cgit v1.2.3-54-g00ecf