Mercurial > hg > sidinfo
comparison sidinfo.c @ 116:d062312ea850
Fix th_strndup_trim() usage.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 15 Feb 2016 12:00:32 +0200 |
parents | 6843261b4cd6 |
children | 24583e5ca0b3 |
comparison
equal
deleted
inserted
replaced
115:6843261b4cd6 | 116:d062312ea850 |
---|---|
222 while (*start) | 222 while (*start) |
223 { | 223 { |
224 PSFStackItem item; | 224 PSFStackItem item; |
225 const char *end = strchr(start, ','); | 225 const char *end = strchr(start, ','); |
226 char *field = (end != NULL) ? | 226 char *field = (end != NULL) ? |
227 th_strndup_trim(start, end - start - 1, TH_TRIM_BOTH) : | 227 th_strndup_trim(start, end - start, TH_TRIM_BOTH) : |
228 th_strdup_trim(start, TH_TRIM_BOTH); | 228 th_strdup_trim(start, TH_TRIM_BOTH); |
229 | 229 |
230 int found = argMatchPSFieldError(field); | 230 int found = argMatchPSFieldError(field); |
231 th_free(field); | 231 th_free(field); |
232 | 232 |