aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/brctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/brctl.c b/networking/brctl.c
index 8ed9d2096..25640246d 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -157,7 +157,8 @@ static int show_bridge(const char *name, int need_hdr)
strcpy(filedata, "yes");
fputs(filedata, stdout);
- strcpy(sfx - (sizeof("bridge/")-1), "brif");
+ /* sfx points past "BR/bridge/", turn it into "BR/brif": */
+ sfx[-4] = 'f'; sfx[-3] = '\0';
tabs = 0;
ifaces = opendir(pathbuf);
if (ifaces) {
@@ -472,8 +473,8 @@ static void show_bridge_stp(const char *name)
{
DIR *ifaces;
- /* sfx points past "BR/bridge/", turn it to "BR/brif": */
- strcpy(sfx - 4, "f");
+ /* sfx points past "BR/bridge/", turn it into "BR/brif": */
+ sfx[-4] = 'f'; sfx[-3] = '\0';
ifaces = opendir(pathbuf);
if (ifaces) {
struct dirent *ent;