Skip to content

Commit

Permalink
Removed 'NULL' string option from testutil_duo_split_at
Browse files Browse the repository at this point in the history
  • Loading branch information
ysyrota authored and AaronAtDuo committed Oct 21, 2024
1 parent 7af310b commit ab4361b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/testutil_duo_split_at.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int failure()
int main (int argc, char *argv[])
{
if (argc != 5) {
printf("Format: %s <string|NULL> <delimiter> <position> <expected|NULL>\n", argv[0]);
printf("Format: %s <string> <delimiter> <position> <expected|NULL>\n", argv[0]);
return EXIT_FAILURE;
}

Expand All @@ -37,10 +37,6 @@ int main (int argc, char *argv[])
int position = atoi(argv[3]);
char *expected = argv[4];

if (strcmp(s, "NULL") == 0) {
s = NULL;
}

char *result = duo_split_at(s, *delimiter, position);

if ((result == NULL && strcmp(expected, "NULL") == 0) ||
Expand Down

0 comments on commit ab4361b

Please sign in to comment.