aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_helpers.h')
-rw-r--r--src/microhttpd/test_helpers.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/microhttpd/test_helpers.h b/src/microhttpd/test_helpers.h
index 4f015ef2..d47f7168 100644
--- a/src/microhttpd/test_helpers.h
+++ b/src/microhttpd/test_helpers.h
@@ -39,29 +39,29 @@
39 * name. 39 * name.
40 */ 40 */
41static int 41static int
42has_in_name(const char *prog_name, const char *marker) 42has_in_name (const char *prog_name, const char *marker)
43{ 43{
44 size_t name_pos; 44 size_t name_pos;
45 size_t pos; 45 size_t pos;
46 46
47 if (!prog_name || !marker || !prog_name[0] || !marker[0]) 47 if (! prog_name || ! marker || ! prog_name[0] || ! marker[0])
48 return 0; 48 return 0;
49 49
50 pos = 0; 50 pos = 0;
51 name_pos = 0; 51 name_pos = 0;
52 while (prog_name[pos]) 52 while (prog_name[pos])
53 { 53 {
54 if ('/' == prog_name[pos]) 54 if ('/' == prog_name[pos])
55 name_pos = pos + 1; 55 name_pos = pos + 1;
56#if defined(_WIN32) || defined(__CYGWIN__) 56#if defined(_WIN32) || defined(__CYGWIN__)
57 else if ('\\' == prog_name[pos]) 57 else if ('\\' == prog_name[pos])
58 name_pos = pos + 1; 58 name_pos = pos + 1;
59#endif /* _WIN32 || __CYGWIN__ */ 59#endif /* _WIN32 || __CYGWIN__ */
60 pos++; 60 pos++;
61 } 61 }
62 if (name_pos == pos) 62 if (name_pos == pos)
63 return 0; 63 return 0;
64 return strstr(prog_name + name_pos, marker) != (char*)0; 64 return strstr (prog_name + name_pos, marker) != (char*) 0;
65} 65}
66 66
67/** 67/**
@@ -75,17 +75,17 @@ has_in_name(const char *prog_name, const char *marker)
75 * non-zero if one of strings in @a argv is equal to @a param. 75 * non-zero if one of strings in @a argv is equal to @a param.
76 */ 76 */
77static int 77static int
78has_param(int argc, char * const argv[], const char * param) 78has_param (int argc, char *const argv[], const char *param)
79{ 79{
80 int i; 80 int i;
81 if (!argv || !param || !param[0]) 81 if (! argv || ! param || ! param[0])
82 return 0; 82 return 0;
83 83
84 for(i = 1; i < argc; i++) 84 for (i = 1; i < argc; i++)
85 { 85 {
86 if(argv[i] && strcmp(argv[i], param) == 0) 86 if (argv[i] &&(strcmp (argv[i], param) == 0) )
87 return !0; 87 return ! 0;
88 } 88 }
89 89
90 return 0; 90 return 0;
91} 91}