Skip to content

Commit

Permalink
Remove needless NULL check
Browse files Browse the repository at this point in the history
NULL and negative value should not be used.
  • Loading branch information
kou committed Dec 12, 2012
1 parent 4750766 commit d7a8293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d7a8293

Please sign in to comment.