diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-09 19:24:42 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-09 19:24:42 +0100 |
commit | 440d9dc470703d20a55365b3a560196e71d450d4 (patch) | |
tree | bcc864c7aeb0af7a81c4fcd7430fa8c3001f8383 /src/common | |
parent | caf842864bdc0794e387f9580af96ab1036996f4 (diff) | |
download | kogata-440d9dc470703d20a55365b3a560196e71d450d4.tar.gz kogata-440d9dc470703d20a55365b3a560196e71d450d4.zip |
Start work on filesystems.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/string.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/string.c b/src/common/string.c index 2c73900..027bf03 100644 --- a/src/common/string.c +++ b/src/common/string.c @@ -10,10 +10,9 @@ size_t strlen(const char* str) { } char *strchr(const char *str, char c) { - while (*str) { + do { if (*str == c) return (char*)str; - str++; - } + } while (*(str++)); return NULL; } |