Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3036148imm; Mon, 28 May 2018 23:04:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJIZxSsLS1wwNvBzYPCzGMu+aHQ+rnJgg3pygRF794g5w2SCoOcU1hEAPfGdAT2Ce82BaWg X-Received: by 2002:a17:902:ba87:: with SMTP id k7-v6mr11018975pls.271.1527573869242; Mon, 28 May 2018 23:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527573869; cv=none; d=google.com; s=arc-20160816; b=I2uYm8RZ8V9ZDoMVjLfiGDusaSyBltD0fZ8I5m7o9rW+MYJk6T6urQuWiOeOlf0HUF jV+ceFSg8uVS1BqytCK8PKgXPKQiHw/IzoUURjD56LguIWX4T7zPe5Ejf04eorhUjiEz ZtNPvTOwdS62PqMt1ASCXh5g5kr9h/m3hQV3+Sl8P2zAvHiZLgUHiknGBOE2XXTpvxFu 77lGMlwZ3RtBgyhE0zStDAHlVXtTu0vfPS92P0UPk0zu+GGEseSryXXnx6azVX/J8eJU wo/SfDCQdWcSgEniV0tJ2iknLilENJOebKjOgnLHJqwjCYw/8EC99S3fDsI+qvE7+h3A hYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=etHFKv83WOipsRKxun9DXOkhDbrTOtYhO077lUCGhHQ=; b=Y7Xexd5fnuNRSJQICQjMsIXcfpDHOY3LaYl1p3XfHKsFsibCacx5xEZBrkR5Qxvaqf crlXN4hMbVDrSxKPTNkwXzp7wJFZVinTd58hwWfy5PkqUvieQVUspguFrEc5lAOQn5/2 Sm1prIlbmyO0slZmp+aB7jM1ojqosodddi4lYIEKxjReZoR0CRO8nxSIDKwKsolB8Pbg QeNxg7d0PUTMIfXf9HKer+S4sdSmUPGuMtf8HSEems+QTEhJ+VRDzHaSkeWBf6U06w66 +pJD0c+mXb6tXmCTZBgNADAv1D1QVfKiUKPWdgUD2xeIJTSS18AaqaRb7IEojhTvd01t 0wkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vEOiw0Jx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k70-v6si25173372pgd.22.2018.05.28.23.04.14; Mon, 28 May 2018 23:04:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vEOiw0Jx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754483AbeE2GDs (ORCPT + 99 others); Tue, 29 May 2018 02:03:48 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:41340 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbeE2GDr (ORCPT ); Tue, 29 May 2018 02:03:47 -0400 Received: by mail-pf0-f194.google.com with SMTP id v63-v6so6753889pfk.8 for ; Mon, 28 May 2018 23:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=etHFKv83WOipsRKxun9DXOkhDbrTOtYhO077lUCGhHQ=; b=vEOiw0Jx8w237LRoUlXp7TFWl8+kPm0CVNTf4j5uYBXzVyri7ybaY4uMIpfk4L69Fa tQUka/NPGyEfoUtzmPEPSBTrL64xEISmGYQrGbzu+qHbRx4TFhfrCwUXnOTgPBFh7I4g ndAvb7p+yVdXB4tNHtex4xvM3N94HR4XAYcmte2veMJPfVWk6ULFZ3JnX47rlTY6vTH2 DJZQaf8kIBKPpOXa8sQc2HYExhKPAOSmbj5HTnD/yXnb1idA6Wac+WxfLSX/EebRLDDm bYi74hU0e8DytXPeBDMNHkhiDDHdGoaXaZ/wjcFhUoaHtlqRbkCuhMN0b1gef5TdFCx0 yWDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=etHFKv83WOipsRKxun9DXOkhDbrTOtYhO077lUCGhHQ=; b=sYRMqaAGHa0gP9gHBtswBykZdTY7OIJ+0wdp0cmtQvmlBgVm22ZIPM2Ta5l5sxuO6W YtTlOU8KeKmOGl4PTaEEuW5yHGQL2ZICOWJZE9pKwMdBnqY1mkDxDbtQwNUJ2ltOpPEx WfhDSS2FOfz6sZTB6B5Sf+WG+mJ9iPbxGxFB/qvmsqO8qsOQf5kRXUDivjfY5OBJyWDT 3T2fLYNDHL3FPBR/DddVH6Jst3o8LdwPwX5+HWOZuI9uEqruJuN5dnGmrofSB2HGZ4G/ ARWGYLBmi5VTZaq//rYZ3UVgH/6AJu1aGyVHyK2v0rIvu63iJ4FLKSnlTEWRI1ERJPGl 1KiQ== X-Gm-Message-State: ALKqPwekAg1sYKxTCcACJEwcsUb9Y0hVRkmg/jba1z4Pg1Cg3N72z/qh P/zuOGXHUYzB85g+PD8ImiE= X-Received: by 2002:a63:8ec8:: with SMTP id k191-v6mr12678152pge.435.1527573826599; Mon, 28 May 2018 23:03:46 -0700 (PDT) Received: from localhost.localdomain (c-24-6-183-110.hsd1.ca.comcast.net. [24.6.183.110]) by smtp.googlemail.com with ESMTPSA id k80-v6sm21702064pfa.168.2018.05.28.23.03.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 May 2018 23:03:45 -0700 (PDT) From: Nick Desaulniers To: rostedt@goodmis.org, mingo@redhat.com Cc: Nick Desaulniers , linux-kernel@vger.kernel.org Subject: [PATCH] tracing: prefer strlcpy to strncpy Date: Mon, 28 May 2018 23:03:38 -0700 Message-Id: <1527573818-29712-1-git-send-email-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes a stringop-truncation warning from gcc-8. Signed-off-by: Nick Desaulniers --- kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index b9061ed..b53a6c0 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -393,7 +393,7 @@ static void hist_err_event(char *str, char *system, char *event, char *var) else if (system) snprintf(err, MAX_FILTER_STR_VAL, "%s.%s", system, event); else - strncpy(err, var, MAX_FILTER_STR_VAL); + strlcpy(err, var, MAX_FILTER_STR_VAL); hist_err(str, err); } -- 2.7.4