mirror of
https://github.com/nmap/nmap.git
synced 2026-01-06 06:29:03 +00:00
Make the argument to Target::setTargetName const.
This commit is contained in:
@@ -307,7 +307,7 @@ void Target::setHostName(char *name) {
|
||||
}
|
||||
}
|
||||
|
||||
void Target::setTargetName(char *name) {
|
||||
void Target::setTargetName(const char *name) {
|
||||
if (targetname) {
|
||||
free(targetname);
|
||||
targetname = NULL;
|
||||
|
||||
2
Target.h
2
Target.h
@@ -205,7 +205,7 @@ class Target {
|
||||
away when you setTargetSockAddr(), so make sure you do these in proper
|
||||
order
|
||||
*/
|
||||
void setTargetName(char *name);
|
||||
void setTargetName(const char *name);
|
||||
|
||||
/* If the host is directly connected on a network, set and retrieve
|
||||
that information here. directlyConnected() will abort if it hasn't
|
||||
|
||||
Reference in New Issue
Block a user