From d7a8293e5331671e2c1a6f8bc6e21bafef460f4d Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Wed, 12 Dec 2012 18:04:32 +0900 Subject: [PATCH] Remove needless NULL check NULL and negative value should not be used. --- lib/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db.c b/lib/db.c index 9711fbe57e..c1d68876b0 100644 --- a/lib/db.c +++ b/lib/db.c @@ -551,7 +551,7 @@ grn_proc_create(grn_ctx *ctx, const char *name, int name_size, grn_proc_type typ } GRN_API_ENTER; range = path ? grn_plugin_get(ctx, path) : GRN_ID_NIL; - if (name && name_size < 0) { + if (name_size < 0) { name_size = strlen(name); } if (grn_db_check_name(ctx, name, name_size)) {