Mercurial > masqmail
comparison src/expand.c @ 15:f671821d8222
code beautifying; 0 -> \0 if appropriate
author | meillo@marmaro.de |
---|---|
date | Thu, 06 Nov 2008 09:18:38 +0100 |
parents | 26e34ae9a3e3 |
children | 41958685480d |
comparison
equal
deleted
inserted
replaced
14:a8f3424347dc | 15:f671821d8222 |
---|---|
94 while (*p && (isalnum(*p) || (*p == '_') || (*p == '-')) && (j < MAX_VAR)) { | 94 while (*p && (isalnum(*p) || (*p == '_') || (*p == '-')) && (j < MAX_VAR)) { |
95 *(vq++) = *(p++); | 95 *(vq++) = *(p++); |
96 j++; | 96 j++; |
97 } | 97 } |
98 } | 98 } |
99 *vq = 0; | 99 *vq = '\0'; |
100 | 100 |
101 if (j < MAX_VAR) { | 101 if (j < MAX_VAR) { |
102 /* search var */ | 102 /* search var */ |
103 value = (gchar *) table_find(var_list, var); | 103 value = (gchar *) table_find(var_list, var); |
104 if (value) { | 104 if (value) { |
118 escape = FALSE; | 118 escape = FALSE; |
119 } | 119 } |
120 p++; | 120 p++; |
121 } | 121 } |
122 } | 122 } |
123 *q = 0; | 123 *q = '\0'; |
124 | 124 |
125 if (i >= (result_len - 1)) | 125 if (i >= (result_len - 1)) |
126 return -3; | 126 return -3; |
127 | 127 |
128 return i; | 128 return i; |