{"id":808821,"url":"http://patchwork.ozlabs.org/api/1.0/patches/808821/?format=json","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.0/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20170901165256.21459-6-phil@nwl.cc>","date":"2017-09-01T16:52:55","name":"[iproute,5/6] tc_util: No need to terminate an snprintf'ed buffer","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"04d767948d291f02ba260ca2d6a428ae710942ad","submitter":{"id":4285,"url":"http://patchwork.ozlabs.org/api/1.0/people/4285/?format=json","name":"Phil Sutter","email":"phil@nwl.cc"},"delegate":{"id":389,"url":"http://patchwork.ozlabs.org/api/1.0/users/389/?format=json","username":"shemminger","first_name":"stephen","last_name":"hemminger","email":"shemminger@vyatta.com"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20170901165256.21459-6-phil@nwl.cc/mbox/","series":[{"id":1076,"url":"http://patchwork.ozlabs.org/api/1.0/series/1076/?format=json","date":"2017-09-01T16:52:50","name":"strlcpy() and strlcat() for iproute2","version":1,"mbox":"http://patchwork.ozlabs.org/series/1076/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808821/checks/","tags":{},"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkQLH33kHz9t2x\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  2 Sep 2017 02:53:43 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752223AbdIAQxl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 12:53:41 -0400","from orbyte.nwl.cc ([151.80.46.58]:48805 \"EHLO mail.nwl.cc\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752202AbdIAQxk (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 1 Sep 2017 12:53:40 -0400","from mail.nwl.cc (orbyte.nwl.cc [127.0.0.1])\n\tby mail.nwl.cc (Postfix) with ESMTP id 49C1765A5E;\n\tFri,  1 Sep 2017 18:53:39 +0200 (CEST)","from xsao (localhost [IPv6:::1])\n\tby mail.nwl.cc (Postfix) with ESMTP id 2B627644CF;\n\tFri,  1 Sep 2017 18:53:39 +0200 (CEST)"],"From":"Phil Sutter <phil@nwl.cc>","To":"Stephen Hemminger <stephen@networkplumber.org>","Cc":"netdev@vger.kernel.org","Subject":"[iproute PATCH 5/6] tc_util: No need to terminate an snprintf'ed\n\tbuffer","Date":"Fri,  1 Sep 2017 18:52:55 +0200","Message-Id":"<20170901165256.21459-6-phil@nwl.cc>","X-Mailer":"git-send-email 2.13.1","In-Reply-To":"<20170901165256.21459-1-phil@nwl.cc>","References":"<20170901165256.21459-1-phil@nwl.cc>","X-Virus-Scanned":"ClamAV using ClamSMTP","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"snprintf() won't leave the buffer unterminated, so manually terminating\nis not necessary here.\n\nSigned-off-by: Phil Sutter <phil@nwl.cc>\n---\n tc/tc_util.c | 1 -\n 1 file changed, 1 deletion(-)","diff":"diff --git a/tc/tc_util.c b/tc/tc_util.c\nindex 371046839ba9f..50d355046bdad 100644\n--- a/tc/tc_util.c\n+++ b/tc/tc_util.c\n@@ -434,7 +434,6 @@ static const char *action_n2a(int action)\n \t\treturn \"trap\";\n \tdefault:\n \t\tsnprintf(buf, 64, \"%d\", action);\n-\t\tbuf[63] = '\\0';\n \t\treturn buf;\n \t}\n }\n","prefixes":["iproute","5/6"]}