diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-10-02 16:54:25 +0000 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-10-02 16:54:25 +0000 |
commit | fe2b5e365b2850e77b063584b3fd23d9090e231c (patch) | |
tree | 66e96d0af02d4a3a7097b67ff9bcdaba33603b19 | |
parent | ca9c6801fcf3c57c720851f57f8cadf95e492c4f (diff) | |
download | nagios-plugin-curl-fe2b5e365b2850e77b063584b3fd23d9090e231c.tar.gz nagios-plugin-curl-fe2b5e365b2850e77b063584b3fd23d9090e231c.tar.bz2 |
small fixes for warnings with gcc 4.4.1 on ArchLinux
-rw-r--r-- | src/curlhelper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/curlhelper.c b/src/curlhelper.c index 8b4d087..a2d442f 100644 --- a/src/curlhelper.c +++ b/src/curlhelper.c @@ -35,7 +35,7 @@ int curlhelp_buffer_callback( void *buffer, size_t size, size_t nmemb, void *str curlhelp_curlbuf *buf = (curlhelp_curlbuf *)stream; while( buf->bufsize < buf->buflen + size * nmemb + 1 ) { - buf->bufsize *= buf->bufsize * 1.3; + buf->bufsize *= buf->bufsize * 2; buf->buf = (char *)realloc( buf->buf, buf->bufsize ); if( buf->buf == NULL ) { return -1; @@ -46,7 +46,7 @@ int curlhelp_buffer_callback( void *buffer, size_t size, size_t nmemb, void *str buf->buflen += size * nmemb; buf->buf[buf->buflen] = '\0'; - return size * nmemb; + return (int)( size * nmemb ); } void curlhelp_freebuffer( curlhelp_curlbuf *buf ) { @@ -63,7 +63,7 @@ int curlhelp_parse_statusline( char *buf, curlhelp_statusline *status_line ) { first_line_end = strstr( buf, "\r\n" ); if( first_line_end == NULL ) return -1; - first_line_len = first_line_end - buf; + first_line_len = (size_t)( first_line_end - buf ); status_line->first_line = (char *)malloc( first_line_len + 1 ); if( status_line->first_line == NULL ) return -1; memcpy( status_line->first_line, buf, first_line_len ); |