diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-14 12:30:25 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-02-14 12:30:25 +0100 |
commit | 096c8e5f2268a2928633f9d436b533331971e7fa (patch) | |
tree | 509ea82140c21ea0681b3944615dbef3ec7d35f9 | |
parent | 5c3c85fcfb42df34e570ca7b4a64d786e44fdd99 (diff) | |
download | curl-bagder/travis-scan-build.tar.gz |
examples/sftpuploadresume: Value stored to 'result' is never readbagder/travis-scan-build
Detected by scan-build
-rw-r--r-- | docs/examples/sftpuploadresume.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c index 6e60c1e57..98f3b62f0 100644 --- a/docs/examples/sftpuploadresume.c +++ b/docs/examples/sftpuploadresume.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -65,6 +65,8 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile) result = curl_easy_getinfo(curlHandlePtr, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &remoteFileSizeByte); + if(result) + return -1; printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte); } curl_easy_cleanup(curlHandlePtr); |