Skip to content

Commit e9688fb

Browse files
committed
make linter happy
1 parent 6a162de commit e9688fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/topn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ SEXP topn(SEXP x, SEXP nArg, SEXP naArg, SEXP ascArg, SEXP sortedArg) {
110110
ans = PROTECT(allocVector(INTSXP, n));
111111
int *restrict ians = INTEGER(ans);
112112
int *restrict INDEX = malloc(n*sizeof(int));
113-
if(INDEX == NULL) error(_("Internal error: Couldn't allocate memory for heap indices.")); // # nocov
113+
if (!INDEX) error(_("Internal error: Couldn't allocate memory for heap indices.")); // # nocov
114114
for (int i=0; i<n; ++i) INDEX[i] = i;
115115
switch(TYPEOF(x)) {
116116
case LGLSXP: case INTSXP: { HEAPN(int, INTEGER, icmp, sorted); } break;

0 commit comments

Comments
 (0)