Simplification of final return statement
This commit is contained in:
parent
760852b6dc
commit
637256206f
1 changed files with 1 additions and 6 deletions
|
@ -9,7 +9,6 @@ static const int MAX_OCTETS = 4;
|
||||||
static const int MAX_DIGITLEN = 12;
|
static const int MAX_DIGITLEN = 12;
|
||||||
static const int MAX_STRLEN = 16;
|
static const int MAX_STRLEN = 16;
|
||||||
static const char SEP = '.';
|
static const char SEP = '.';
|
||||||
|
|
||||||
static int in_range(char buf[MAX_BUFLEN]);
|
static int in_range(char buf[MAX_BUFLEN]);
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -45,11 +44,7 @@ isinetaddr4(const char *str)
|
||||||
octets++;
|
octets++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (octets == MAX_OCTETS) {
|
return octets == MAX_OCTETS && digits <= MAX_DIGITLEN;
|
||||||
return digits <= MAX_DIGITLEN;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue