Mercurial > hg > nnchat
diff util.c @ 700:f3ec1cb11cea
Trim whitespace.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 17 Jan 2020 20:03:41 +0200 |
parents | ceb73b712121 |
children | 93d0e1547842 |
line wrap: on
line diff
--- a/util.c Fri Jan 17 19:30:48 2020 +0200 +++ b/util.c Fri Jan 17 20:03:41 2020 +0200 @@ -37,7 +37,7 @@ for (pos = strlen(buf) - 1; pos > 0 && th_isspace(buf[pos]); pos--) buf[pos] = 0; - + return buf; } @@ -467,13 +467,13 @@ int n = 0; const uint8_t *c = (uint8_t *)name; uint8_t hash = 0xff; - + while (*c && n < 4) { hash = (hash << 1) ^ tolower(*c); c++; n++; } - + return (hash & 0xff); */ return (uint8_t) tolower(name[0]);