From: Michael Stapelberg Date: Thu, 28 Apr 2011 18:24:16 +0000 (+0200) Subject: remove useless checks, size_t != ssize_t :) X-Git-Tag: tree-pr3~64 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2c6508a6a36f38e9db8c36249c0ce74f0aa5e92d;p=i3%2Fi3 remove useless checks, size_t != ssize_t :) --- diff --git a/src/ipc.c b/src/ipc.c index 27f89677..e63718cb 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -443,10 +443,6 @@ static int add_subscription(void *extra, const unsigned char *s, #else static int add_subscription(void *extra, const unsigned char *s, size_t len) { - if (len < 0) { - DLOG("Invalid subscription with len %zd\n", len); - return 1; - } #endif ipc_client *client = extra; diff --git a/src/load_layout.c b/src/load_layout.c index c104ad2e..f946c666 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -71,10 +71,6 @@ static int json_end_array(void *ctx) { static int json_key(void *ctx, const unsigned char *val, unsigned int len) { #else static int json_key(void *ctx, const unsigned char *val, size_t len) { - if (len < 0) { - LOG("Invalid key, len = %zd\n", len); - return 1; - } #endif LOG("key: %.*s\n", (int)len, val); FREE(last_key); @@ -97,10 +93,6 @@ static int json_string(void *ctx, const unsigned char *val, size_t len) { #else static int json_string(void *ctx, const unsigned char *val, unsigned int len) { #endif - if (len < 0) { - LOG("Invalid string for key %s\n", last_key); - return 1; - } LOG("string: %.*s for key %s\n", len, val, last_key); if (parsing_swallows) { /* TODO: the other swallowing keys */