diff options
author | Elliott Hughes <enh@google.com> | 2017-09-20 17:00:17 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-09-21 09:38:15 -0700 |
commit | 82be86df6ec7baa34d6169c053fd1dfe56fa858e (patch) | |
tree | afd04b931f1f59dfe81b0daa450306ff0204319b /tests/libtest/lib537.c | |
parent | bfa505f61d33429f40bf843b7871fc793dd017d4 (diff) | |
download | external_curl-82be86df6ec7baa34d6169c053fd1dfe56fa858e.tar.gz external_curl-82be86df6ec7baa34d6169c053fd1dfe56fa858e.tar.bz2 external_curl-82be86df6ec7baa34d6169c053fd1dfe56fa858e.zip |
Update libcurl from 7.54.1 to 7.55.1.
Bug: http://b/64610131
Test: builds, boots, `vendor/google/tools/fake-ota on streaming` works
Change-Id: I7ecaf9c83e9496ac4a379507791bec637deaa4cb
Diffstat (limited to 'tests/libtest/lib537.c')
-rw-r--r-- | tests/libtest/lib537.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index c1561419..b5ee2ce5 100644 --- a/tests/libtest/lib537.c +++ b/tests/libtest/lib537.c @@ -87,7 +87,7 @@ static int fopen_works(void) for(i = 0; i < 3; i++) { fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT); if(fpa[i] == NULL) { - store_errmsg("fopen failed", ERRNO); + store_errmsg("fopen failed", errno); fprintf(stderr, "%s\n", msgbuff); ret = 0; break; @@ -103,7 +103,7 @@ static int fopen_works(void) static int rlimit(int keep_open) { int *tmpfd; - int nitems, i; + rlim_t nitems, i; int *memchunk = NULL; char *fmt; struct rlimit rl; @@ -123,7 +123,7 @@ static int rlimit(int keep_open) /* get initial open file limits */ if(getrlimit(RLIMIT_NOFILE, &rl) != 0) { - store_errmsg("getrlimit() failed", ERRNO); + store_errmsg("getrlimit() failed", errno); fprintf(stderr, "%s\n", msgbuff); return -1; } @@ -164,7 +164,7 @@ static int rlimit(int keep_open) rl.rlim_cur = OPEN_MAX; if(setrlimit(RLIMIT_NOFILE, &rl) != 0) { /* on failure don't abort just issue a warning */ - store_errmsg("setrlimit() failed", ERRNO); + store_errmsg("setrlimit() failed", errno); fprintf(stderr, "%s\n", msgbuff); msgbuff[0] = '\0'; } @@ -175,7 +175,7 @@ static int rlimit(int keep_open) rl.rlim_cur = rl.rlim_max; if(setrlimit(RLIMIT_NOFILE, &rl) != 0) { /* on failure don't abort just issue a warning */ - store_errmsg("setrlimit() failed", ERRNO); + store_errmsg("setrlimit() failed", errno); fprintf(stderr, "%s\n", msgbuff); msgbuff[0] = '\0'; } @@ -183,7 +183,7 @@ static int rlimit(int keep_open) /* get current open file limits */ if(getrlimit(RLIMIT_NOFILE, &rl) != 0) { - store_errmsg("getrlimit() failed", ERRNO); + store_errmsg("getrlimit() failed", errno); fprintf(stderr, "%s\n", msgbuff); return -3; } @@ -232,7 +232,7 @@ static int rlimit(int keep_open) if(nitems > 0x7fff) nitems = 0x40000; do { - num_open.rlim_max = sizeof(*memchunk) * (size_t)nitems; + num_open.rlim_max = sizeof(*memchunk) * nitems; snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max); fprintf(stderr, "allocating memchunk %s byte array\n", strbuff); memchunk = malloc(sizeof(*memchunk) * (size_t)nitems); @@ -242,7 +242,7 @@ static int rlimit(int keep_open) } } while(nitems && !memchunk); if(!memchunk) { - store_errmsg("memchunk, malloc() failed", ERRNO); + store_errmsg("memchunk, malloc() failed", errno); fprintf(stderr, "%s\n", msgbuff); return -4; } @@ -297,7 +297,7 @@ static int rlimit(int keep_open) } } while(num_open.rlim_max && !fd); if(!fd) { - store_errmsg("fd, malloc() failed", ERRNO); + store_errmsg("fd, malloc() failed", errno); fprintf(stderr, "%s\n", msgbuff); free(memchunk); return -6; @@ -320,7 +320,7 @@ static int rlimit(int keep_open) fd[0] = open(DEV_NULL, O_RDONLY); if(fd[0] < 0) { snprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL); - store_errmsg(strbuff, ERRNO); + store_errmsg(strbuff, errno); fprintf(stderr, "%s\n", msgbuff); free(fd); fd = NULL; @@ -491,7 +491,8 @@ int test(char *URL) return TEST_ERR_MAJOR_BAD; } - if((curl = curl_easy_init()) == NULL) { + curl = curl_easy_init(); + if(!curl) { fprintf(stderr, "curl_easy_init() failed\n"); close_file_descriptors(); curl_global_cleanup(); |