Skip to content

Commit bf75e40

Browse files
authored
Fix double declaration for len
1 parent 9784623 commit bf75e40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codereview101/snipMemory5.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
int len = 0, total = 0;
33
while(1){
44
fgets(buff1, MAX_SIZE, stdin);
5-
int len = strnlen(buff1, MAX_SIZE);
5+
len = strnlen(buff1, MAX_SIZE);
66
total += len;
77
if(total <= MAX_SIZE) strncat(buff2, buff1, len);
88
else break;

0 commit comments

Comments
 (0)