From 2c6508a6a36f38e9db8c36249c0ce74f0aa5e92d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 28 Apr 2011 20:24:16 +0200 Subject: [PATCH] remove useless checks, size_t != ssize_t :) --- src/ipc.c | 4 ---- src/load_layout.c | 8 -------- 2 files changed, 12 deletions(-) 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 */ -- 2.39.5