diff options
author | Max Dymond <max.dymond@metaswitch.com> | 2017-07-10 13:50:15 +0100 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2017-07-10 16:19:23 +0200 |
commit | e909de65b907ae2be5874201b6881a5196e68c17 (patch) | |
tree | 2b4d0b4208b0511b3ab4eaca8c311a7e211dbfa8 /tests/libtest/lib518.c | |
parent | a5834e525deb6d233990ae2288b156728db32cec (diff) | |
download | curl-e909de65b907ae2be5874201b6881a5196e68c17.tar.gz |
tests: Fix up issues with errno in test files
Closes https://github.com/curl/curl/pull/1671
Diffstat (limited to 'tests/libtest/lib518.c')
-rw-r--r-- | tests/libtest/lib518.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index 960fcfca2..e2dcb440d 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -86,7 +86,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; @@ -122,7 +122,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; } @@ -169,7 +169,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'; } @@ -180,7 +180,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'; } @@ -188,7 +188,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; } @@ -268,7 +268,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 -5; } @@ -303,7 +303,7 @@ static int rlimit(int keep_open) fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max)); if(!fd) { - store_errmsg("fd, malloc() failed", ERRNO); + store_errmsg("fd, malloc() failed", errno); fprintf(stderr, "%s\n", msgbuff); free(memchunk); return -7; @@ -326,7 +326,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; |