Skip to content

Commit 9b05759

Browse files
committed
remove unreachable code
1 parent a9851ef commit 9b05759

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/freadR.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,8 @@ SEXP freadR(
159159
// here we use bool and rely on fread at R level to check these do not contain NA_LOGICAL
160160
args.stripWhite = LOGICAL(stripWhiteArg)[0];
161161
args.skipEmptyLines = LOGICAL(skipEmptyLinesArg)[0];
162-
if (!isString(commentCharArg) || LENGTH(commentCharArg) != 1)
163-
error(_("comment.char must be a single character vector of length 1")); // # notranslate
164162
const char *commentStr = CHAR(STRING_ELT(commentCharArg, 0));
165-
size_t commentLen = strlen(commentStr);
166-
if (commentLen > 1)
167-
error(_("comment.char must be a single character or \"\"")); // # notranslate
168-
args.comment = commentLen == 0 ? '\0' : commentStr[0];
163+
args.comment = strlen(commentStr) == 0 ? '\0' : commentStr[0];
169164
args.fill = INTEGER(fillArg)[0];
170165
args.showProgress = LOGICAL(showProgressArg)[0];
171166
if (INTEGER(nThreadArg)[0] < 1)

0 commit comments

Comments
 (0)