kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 9340d132dbc2ab1156f1b19d9921f584c5943c87
parent 91fb225e5c51809fa06b1287056bd5b0eb544fc0
Author: Joris Vink <joris@coders.se>
Date:   Sat, 13 Feb 2016 14:02:10 +0100

don't bother with empty things in kore_text_trim.

Diffstat:
src/utils.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/utils.c b/src/utils.c @@ -503,7 +503,10 @@ kore_text_trim(char *string, size_t len) { char *end; - end = string + strlen(string) - 1; + if (len == 0) + return (string); + + end = string + len - 1; while (isspace(*string)) string++;