remove useless checks, size_t != ssize_t :)
This commit is contained in:
parent
528f486eee
commit
2c6508a6a3
|
@ -443,10 +443,6 @@ static int add_subscription(void *extra, const unsigned char *s,
|
||||||
#else
|
#else
|
||||||
static int add_subscription(void *extra, const unsigned char *s,
|
static int add_subscription(void *extra, const unsigned char *s,
|
||||||
size_t len) {
|
size_t len) {
|
||||||
if (len < 0) {
|
|
||||||
DLOG("Invalid subscription with len %zd\n", len);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
ipc_client *client = extra;
|
ipc_client *client = extra;
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,6 @@ static int json_end_array(void *ctx) {
|
||||||
static int json_key(void *ctx, const unsigned char *val, unsigned int len) {
|
static int json_key(void *ctx, const unsigned char *val, unsigned int len) {
|
||||||
#else
|
#else
|
||||||
static int json_key(void *ctx, const unsigned char *val, size_t len) {
|
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
|
#endif
|
||||||
LOG("key: %.*s\n", (int)len, val);
|
LOG("key: %.*s\n", (int)len, val);
|
||||||
FREE(last_key);
|
FREE(last_key);
|
||||||
|
@ -97,10 +93,6 @@ static int json_string(void *ctx, const unsigned char *val, size_t len) {
|
||||||
#else
|
#else
|
||||||
static int json_string(void *ctx, const unsigned char *val, unsigned int len) {
|
static int json_string(void *ctx, const unsigned char *val, unsigned int len) {
|
||||||
#endif
|
#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);
|
LOG("string: %.*s for key %s\n", len, val, last_key);
|
||||||
if (parsing_swallows) {
|
if (parsing_swallows) {
|
||||||
/* TODO: the other swallowing keys */
|
/* TODO: the other swallowing keys */
|
||||||
|
|
Loading…
Reference in New Issue