From 9898aafa0c1212b6c4aee99cb6b9f8280e88e5af Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 9 Jul 2018 01:32:21 +0200 Subject: devip: don't pad the tag for routing commands (fixes removing routes with < 4 character tags) --- sys/src/9/ip/devip.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sys/src') diff --git a/sys/src/9/ip/devip.c b/sys/src/9/ip/devip.c index 447c1ce68..a00d4ed84 100644 --- a/sys/src/9/ip/devip.c +++ b/sys/src/9/ip/devip.c @@ -260,15 +260,10 @@ IPaux* newipaux(char *owner, char *tag) { IPaux *a; - int n; a = smalloc(sizeof(*a)); kstrdup(&a->owner, owner); - memset(a->tag, ' ', sizeof(a->tag)); - n = strlen(tag); - if(n > sizeof(a->tag)) - n = sizeof(a->tag); - memmove(a->tag, tag, n); + strncpy(a->tag, tag, sizeof(a->tag)); return a; } -- cgit v1.2.3