diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -92,12 +92,12 @@ int parse_local_port_forward(char *string, int *local_port, char **hostname, int | |||
92 | 92 | ||
93 | /* First replace all @ with :, ':' is forbidden in some environments */ | 93 | /* First replace all @ with :, ':' is forbidden in some environments */ |
94 | char *p = string; | 94 | char *p = string; |
95 | while(*p) | 95 | while(*p) |
96 | { | 96 | { |
97 | if(*p == '@') *p = ':'; | 97 | if(*p == '@') *p = ':'; |
98 | p++; | 98 | p++; |
99 | } | 99 | } |
100 | 100 | ||
101 | lport = strtok(string, ":"); | 101 | lport = strtok(string, ":"); |
102 | host = strtok(NULL, ":"); | 102 | host = strtok(NULL, ":"); |
103 | rport = strtok(NULL, ":"); | 103 | rport = strtok(NULL, ":"); |
@@ -123,12 +123,12 @@ int parse_pipe_port_forward(char *string, char **hostname, int *remote_port) | |||
123 | 123 | ||
124 | /* First replace all @ with :, ':' is forbidden in some environments */ | 124 | /* First replace all @ with :, ':' is forbidden in some environments */ |
125 | char *p = string; | 125 | char *p = string; |
126 | while(*p) | 126 | while(*p) |
127 | { | 127 | { |
128 | if(*p == '@') *p = ':'; | 128 | if(*p == '@') *p = ':'; |
129 | p++; | 129 | p++; |
130 | } | 130 | } |
131 | 131 | ||
132 | host = strtok(string, ":"); | 132 | host = strtok(string, ":"); |
133 | rport = strtok(NULL, ":"); | 133 | rport = strtok(NULL, ":"); |
134 | 134 | ||