@@ -446,8 +446,7 @@ static int sockopt_callback(void *client, curl_socket_t fd, curlsocktype type)
446
446
447
447
rc = setsockopt (fd , SOL_SOCKET , SO_KEEPALIVE , (void * )& ka , len );
448
448
if (rc < 0 )
449
- warning ("unable to set SO_KEEPALIVE on socket %s" ,
450
- strerror (errno ));
449
+ warning_errno ("unable to set SO_KEEPALIVE on socket" );
451
450
452
451
return 0 ; /* CURL_SOCKOPT_OK only exists since curl 7.21.5 */
453
452
}
@@ -1891,8 +1890,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
1891
1890
}
1892
1891
1893
1892
if (freq -> localfile < 0 ) {
1894
- error ("Couldn't create temporary file %s: %s" ,
1895
- freq -> tmpfile , strerror (errno ));
1893
+ error_errno ("Couldn't create temporary file %s" , freq -> tmpfile );
1896
1894
goto abort ;
1897
1895
}
1898
1896
@@ -1937,8 +1935,8 @@ struct http_object_request *new_http_object_request(const char *base_url,
1937
1935
prev_posn = 0 ;
1938
1936
lseek (freq -> localfile , 0 , SEEK_SET );
1939
1937
if (ftruncate (freq -> localfile , 0 ) < 0 ) {
1940
- error ("Couldn't truncate temporary file %s: %s" ,
1941
- freq -> tmpfile , strerror ( errno ) );
1938
+ error_errno ("Couldn't truncate temporary file %s" ,
1939
+ freq -> tmpfile );
1942
1940
goto abort ;
1943
1941
}
1944
1942
}
0 commit comments