aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_get_sendfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_get_sendfile.c')
-rw-r--r--src/testcurl/test_get_sendfile.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c
index 6718106d..fb040afe 100644
--- a/src/testcurl/test_get_sendfile.c
+++ b/src/testcurl/test_get_sendfile.c
@@ -576,15 +576,19 @@ main (int argc, char *const *argv)
576 FILE *f; 576 FILE *f;
577 (void)argc; /* Unused. Silent compiler warning. */ 577 (void)argc; /* Unused. Silent compiler warning. */
578 578
579 oneone = (NULL != strrchr (argv[0], (int) '/')) ?
580 (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
581
579 if ( (NULL == (tmp = getenv ("TMPDIR"))) && 582 if ( (NULL == (tmp = getenv ("TMPDIR"))) &&
580 (NULL == (tmp = getenv ("TMP"))) && 583 (NULL == (tmp = getenv ("TMP"))) &&
581 (NULL == (tmp = getenv ("TEMP"))) ) 584 (NULL == (tmp = getenv ("TEMP"))) )
582 tmp = "/tmp"; 585 tmp = "/tmp";
583 sourcefile = malloc (strlen (tmp) + 32); 586 sourcefile = malloc (strlen (tmp) + 32);
584 sprintf (sourcefile, 587 sprintf (sourcefile,
585 "%s/%s", 588 "%s/%s%s",
586 tmp, 589 tmp,
587 "test-mhd-sendfile"); 590 "test-mhd-sendfile",
591 oneone ? "11" : "");
588 f = fopen (sourcefile, "w"); 592 f = fopen (sourcefile, "w");
589 if (NULL == f) 593 if (NULL == f)
590 { 594 {
@@ -594,8 +598,6 @@ main (int argc, char *const *argv)
594 } 598 }
595 fwrite (TESTSTR, strlen (TESTSTR), 1, f); 599 fwrite (TESTSTR, strlen (TESTSTR), 1, f);
596 fclose (f); 600 fclose (f);
597 oneone = (NULL != strrchr (argv[0], (int) '/')) ?
598 (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
599 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 601 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
600 return 2; 602 return 2;
601 errorCount += testInternalGet (); 603 errorCount += testInternalGet ();