From c58db87df1117e6c3819648d49c710a7a000a6e2 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 17 Sep 2006 12:58:12 +0000 Subject: [PATCH] * A few coding style fixes. --- kernel/kernel.c | 8 ++++---- src/cacaview.c | 6 +++--- src/img2irc.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/kernel.c b/kernel/kernel.c index e115d35..7241d96 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -176,16 +176,16 @@ int strcasecmp(const char *s1, const char *s2) int memcmp(const char *s1, const char *s2, size_t n) { - while(n) { - if(*s1 != *s2) return *s1-*s2; + while(n--) + { + if(*s1 != *s2) + return *s1 - *s2; *s1++; *s2++; - n--; } return 0; } - /* stdarg.h functions */ int vsnprintf(char *str, size_t size, const char *format, va_list ap) { diff --git a/src/cacaview.c b/src/cacaview.c index 0fe543d..d0ed2fe 100644 --- a/src/cacaview.c +++ b/src/cacaview.c @@ -15,9 +15,9 @@ #include "common.h" #if !defined(__KERNEL__) -#include -#include -#include +# include +# include +# include #endif #if defined(HAVE_SLEEP) diff --git a/src/img2irc.c b/src/img2irc.c index 7135c50..72eae83 100644 --- a/src/img2irc.c +++ b/src/img2irc.c @@ -16,9 +16,9 @@ #if !defined(__KERNEL__) # include -#include -#include -# endif +# include +# include +#endif #include "cucul.h" #include "common-image.h"