mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:53:34 +03:00
parent
08f97cbf5c
commit
b2bccdc257
49 changed files with 113 additions and 113 deletions
|
|
@ -61,7 +61,7 @@ static int my_seek(void *userp, curl_off_t offset, int origin)
|
|||
{
|
||||
FILE *fp = (FILE *) userp;
|
||||
|
||||
if(-1 == fseek(fp, (long) offset, origin))
|
||||
if(fseek(fp, (long) offset, origin) == -1)
|
||||
/* could not seek */
|
||||
return CURL_SEEKFUNC_CANTSEEK;
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ static struct ip *ip_list_append(struct ip *list, const char *data)
|
|||
ip->maskbits = 128;
|
||||
#endif
|
||||
|
||||
if(1 != inet_pton(ip->family, ip->str, &ip->netaddr)) {
|
||||
if(inet_pton(ip->family, ip->str, &ip->netaddr) != 1) {
|
||||
free(ip->str);
|
||||
free(ip);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ int main(void)
|
|||
NULL, /* default attributes please */
|
||||
pull_one_url,
|
||||
(void *)urls[i]);
|
||||
if(0 != error)
|
||||
if(error)
|
||||
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
||||
else
|
||||
fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static int sftpResumeUpload(CURL *curlhandle, const char *remotepath,
|
|||
CURLcode result = CURLE_GOT_NOTHING;
|
||||
|
||||
curl_off_t remoteFileSizeByte = sftpGetRemoteFileSize(remotepath);
|
||||
if(-1 == remoteFileSizeByte) {
|
||||
if(remoteFileSizeByte == -1) {
|
||||
printf("Error reading the remote file size: unable to resume upload\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ void *create_thread(void *progress_bar)
|
|||
NULL, /* default attributes please */
|
||||
pull_one_url,
|
||||
NULL);
|
||||
if(0 != error)
|
||||
if(error)
|
||||
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
||||
else
|
||||
fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ int main(int argc, char **argv)
|
|||
NULL, /* default attributes please */
|
||||
pull_one_url,
|
||||
(void *)urls[i]);
|
||||
if(0 != error)
|
||||
if(error)
|
||||
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
||||
else
|
||||
fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue