diff --git a/Target.cc b/Target.cc index 76cba6d37..05db9aafd 100644 --- a/Target.cc +++ b/Target.cc @@ -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; diff --git a/Target.h b/Target.h index dafca338c..d4c98d041 100644 --- a/Target.h +++ b/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