Skip to content

Commit

Permalink
interface: Remove obsolete method.
Browse files Browse the repository at this point in the history
Now that all call sites have been converted to interface_create(), there
is no longer any needed for a way to set the interface's name.  This patch
removes the useless method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
  • Loading branch information
richardcochran committed Mar 4, 2020
1 parent b878dd9 commit 0a4d85c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
7 changes: 1 addition & 6 deletions interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct interface *interface_create(const char *name)
if (!iface) {
return NULL;
}
interface_set_name(iface, name);
strncpy(iface->name, name, MAX_IFNAME_SIZE);

return iface;
}
Expand Down Expand Up @@ -64,11 +64,6 @@ void interface_set_label(struct interface *iface, const char *label)
strncpy(iface->ts_label, label, MAX_IFNAME_SIZE);
}

void interface_set_name(struct interface *iface, const char *name)
{
strncpy(iface->name, name, MAX_IFNAME_SIZE);
}

bool interface_tsinfo_valid(struct interface *iface)
{
return iface->ts_info.valid ? true : false;
Expand Down
7 changes: 0 additions & 7 deletions interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ int interface_phc_index(struct interface *iface);
*/
void interface_set_label(struct interface *iface, const char *label);

/**
* Set the name of a given interface.
* @param iface The interface of interest.
* @param name The desired name for the interface.
*/
void interface_set_name(struct interface *iface, const char *name);

/**
* Tests whether an interface's time stamping information is valid or not.
* @param iface The interface of interest.
Expand Down

0 comments on commit 0a4d85c

Please sign in to comment.