Skip to content

Commit

Permalink
Use GRN_API_RETURN
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 19, 2019
1 parent 1ecc874 commit 9789441
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/token_cursor.c
@@ -1,7 +1,7 @@
/* -*- c-basic-offset: 2 -*- */
/*
Copyright(C) 2009-2018 Brazil
Copyright(C) 2018 Kouhei Sutou <kou@clear-code.com>
Copyright(C) 2018-2019 Kouhei Sutou <kou@clear-code.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -83,7 +83,9 @@ grn_token_cursor_open(grn_ctx *ctx, grn_obj *table,
"[token-cursor][open] failed to get table information");
GRN_API_RETURN(NULL);
}
if (!(token_cursor = GRN_MALLOC(sizeof(grn_token_cursor)))) { return NULL; }
if (!(token_cursor = GRN_MALLOC(sizeof(grn_token_cursor)))) {
GRN_API_RETURN(NULL);
}
token_cursor->table = table;
token_cursor->mode = mode;
token_cursor->encoding = encoding;
Expand Down

0 comments on commit 9789441

Please sign in to comment.