mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Avoid extra copying of sockaddr storage; pass by reference. #1834
This commit is contained in:
parent
3618f48b89
commit
ee95fa8d30
2 changed files with 2 additions and 2 deletions
|
|
@ -182,7 +182,7 @@ struct sockaddr_storage NEPContext::getAddress(){
|
|||
} /* End of getAddress() */
|
||||
|
||||
|
||||
int NEPContext::setAddress(struct sockaddr_storage a){
|
||||
int NEPContext::setAddress(const struct sockaddr_storage &a){
|
||||
this->clnt_addr=a;
|
||||
return OP_SUCCESS;
|
||||
} /* End of setAddress() */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ class NEPContext {
|
|||
int setIdentifier(clientid_t clnt);
|
||||
clientid_t getIdentifier();
|
||||
|
||||
int setAddress(struct sockaddr_storage a);
|
||||
int setAddress(const struct sockaddr_storage &a);
|
||||
struct sockaddr_storage getAddress();
|
||||
|
||||
int setNsockIOD(nsock_iod iod);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue