diff options
Diffstat (limited to 'src/testcurl/mhd_has_in_name.h')
-rw-r--r-- | src/testcurl/mhd_has_in_name.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/testcurl/mhd_has_in_name.h b/src/testcurl/mhd_has_in_name.h index 50f32cca..aff15e15 100644 --- a/src/testcurl/mhd_has_in_name.h +++ b/src/testcurl/mhd_has_in_name.h | |||
@@ -39,27 +39,27 @@ | |||
39 | * name. | 39 | * name. |
40 | */ | 40 | */ |
41 | static int | 41 | static int |
42 | has_in_name(const char *prog_name, const char *marker) | 42 | has_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 | } |