History

misparsing 9grid.net

Russ Cox committed 20 years ago

Commit af11a9e1 parent 17efd161 file · +4 −2Browse files

Unified · Split

kern/devip.c+4−2
@@ -689,10 +689,12 @@ parseip(char *to, char *from) · 688 unmodified lines
689689 memset(to, 0, 4);
690690 for(i = 0; i < 4 && *p; i++){
691691 to[i] = strtoul(p, &p, 10);
692+ if(*p != '.' && *p != 0){
693+ memset(to, 0, 4);
694+ return 0;
695+ }
692696 if(*p == '.')
693697 p++;
694− if(*p != '.' && *p != 0)
695− return 0;
696698 }
697699 switch(CLASS(to)){
698700 case 0: /* class A - 1 byte net */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t