summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 012b412)
raw | patch | inline | side by side (parent: 012b412)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 10 Jan 2014 08:17:05 +0000 (09:17 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 10 Jan 2014 08:17:05 +0000 (09:17 +0100) |
Keep whitespace in order to keep the users formatting and keep semicolons to
ensure correct parsing (avoid possible future ambiquity).
ensure correct parsing (avoid possible future ambiquity).
src/tools/sysdb/command.c | patch | blob | history |
index 3b64def385ebd64251bbd07dc4f79fe500353da8..b568aaec3289f0b5dd29c1db48d1d232e7ab2288 100644 (file)
assert(input->query_len <= input->tokenizer_pos);
- /* removing leading and trailing whitespace */
- while (isspace((int)*query) && query_len) {
+ /* removing leading and trailing newlines */
+ while (query_len && (*query == '\n')) {
++query;
--query_len;
}
- while (query_len && (isspace((int)query[query_len - 1])
- || (query[query_len - 1] == ';')))
+ while (query_len && (query[query_len - 1]) == '\n')
--query_len;
if (query_len) {