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/lib537.c | |
parent | a5834e525deb6d233990ae2288b156728db32cec (diff) |
tests: Fix up issues with errno in test files
Closes https://github.com/curl/curl/pull/1671
Diffstat (limited to 'tests/libtest/lib537.c')
-rw-r--r-- | tests/libtest/lib537.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index cfa1179d7..b5ee2ce5b 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; @@ -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; } @@ -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; |