Skip to content

Commit 51a72b3

Browse files
authored
replaced 0 with NULL (best practice for C) (#7244)
* replaced 0 with NULL (best practice for C) * yikes, embarrassing
1 parent dd8caaa commit 51a72b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fcast.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SEXP fcast(SEXP lhs, SEXP val, SEXP nrowArg, SEXP ncolArg, SEXP idxArg, SEXP fil
3838
case INTSXP:
3939
case LGLSXP: {
4040
const int *ithiscol = INTEGER(thiscol);
41-
const int *ithisfill = 0;
41+
const int *ithisfill = NULL;
4242
if (some_fill) ithisfill = INTEGER(thisfill);
4343
for (int j=0; j<ncols; ++j) {
4444
SET_VECTOR_ELT(ans, nlhs+j+i*ncols, target=allocVector(thistype, nrows) );
@@ -52,7 +52,7 @@ SEXP fcast(SEXP lhs, SEXP val, SEXP nrowArg, SEXP ncolArg, SEXP idxArg, SEXP fil
5252
} break;
5353
case REALSXP: {
5454
const double *dthiscol = REAL(thiscol);
55-
const double *dthisfill = 0;
55+
const double *dthisfill = NULL;
5656
if (some_fill) dthisfill = REAL(thisfill);
5757
for (int j=0; j<ncols; ++j) {
5858
SET_VECTOR_ELT(ans, nlhs+j+i*ncols, target=allocVector(thistype, nrows) );
@@ -66,7 +66,7 @@ SEXP fcast(SEXP lhs, SEXP val, SEXP nrowArg, SEXP ncolArg, SEXP idxArg, SEXP fil
6666
} break;
6767
case CPLXSXP: {
6868
const Rcomplex *zthiscol = COMPLEX(thiscol);
69-
const Rcomplex *zthisfill = 0;
69+
const Rcomplex *zthisfill = NULL;
7070
if (some_fill) zthisfill = COMPLEX(thisfill);
7171
for (int j=0; j<ncols; ++j) {
7272
SET_VECTOR_ELT(ans, nlhs+j+i*ncols, target=allocVector(thistype, nrows) );

0 commit comments

Comments
 (0)