Skip to content

Commit 593c614

Browse files
committed
fix: remove unnecessary NULL and null-byte checks
1 parent d693345 commit 593c614

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

pandas/_libs/src/parser/tokenizer.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,10 +1847,6 @@ int uint64_conflict(uint_state *self) {
18471847
* @return Non-zero integer indicating that has a digit 0 otherwise.
18481848
*/
18491849
static inline bool has_digit_int(const char *str) {
1850-
if (!str || *str == '\0') {
1851-
return false;
1852-
}
1853-
18541850
switch (*str) {
18551851
case '0':
18561852
case '1':
@@ -1914,11 +1910,6 @@ static int copy_string_without_char(char output[PROCESSED_WORD_CAPACITY],
19141910

19151911
int64_t str_to_int64(const char *p_item, int64_t int_min, int64_t int_max,
19161912
int *error, char tsep) {
1917-
if (!p_item || *p_item == '\0') {
1918-
*error = ERROR_NO_DIGITS;
1919-
return 0;
1920-
}
1921-
19221913
while (isspace_ascii(*p_item)) {
19231914
++p_item;
19241915
}
@@ -1970,11 +1961,6 @@ int64_t str_to_int64(const char *p_item, int64_t int_min, int64_t int_max,
19701961

19711962
uint64_t str_to_uint64(uint_state *state, const char *p_item, int64_t int_max,
19721963
uint64_t uint_max, int *error, char tsep) {
1973-
if (!p_item || *p_item == '\0') {
1974-
*error = ERROR_NO_DIGITS;
1975-
return 0;
1976-
}
1977-
19781964
while (isspace_ascii(*p_item)) {
19791965
++p_item;
19801966
}

0 commit comments

Comments
 (0)