Skip to content

Commit 3eb45ed

Browse files
committed
Fix type of value assigned from strlen() in getline.c
This was declared as int, but strlen() in posix returns size_t. https://pubs.opengroup.org/onlinepubs/009604499/functions/strlen.html
1 parent 93e1cb1 commit 3eb45ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/native/getline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ char *p;
982982
/* makes a copy of the string */
983983
{
984984
char *s = 0;
985-
int len = strlen(p);
985+
size_t len = strlen(p);
986986
char *nl = strchr(p, '\n');
987987

988988
if (nl) {

0 commit comments

Comments
 (0)