mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Remove always-true condition, but be clear that n does not change in this function
This commit is contained in:
parent
608d866fb7
commit
9faf70fc78
1 changed files with 2 additions and 3 deletions
|
|
@ -489,7 +489,7 @@ void WriteSInfo(char *ostr, int ostrlen, bool isGoodFP,
|
|||
No more than n bytes will be written. Unless n is 0, the string is always
|
||||
null-terminated. Returns the number of bytes written, excluding the
|
||||
terminator. */
|
||||
static int test2str(const FingerTest *test, char *s, size_t n) {
|
||||
static int test2str(const FingerTest *test, char *s, const size_t n) {
|
||||
std::vector<struct AVal>::const_iterator av;
|
||||
char *p;
|
||||
char *end;
|
||||
|
|
@ -541,8 +541,7 @@ static int test2str(const FingerTest *test, char *s, size_t n) {
|
|||
return p - s;
|
||||
|
||||
error:
|
||||
if (n > 0)
|
||||
*s = '\0';
|
||||
*s = '\0';
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue