Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2921172pxa; Tue, 18 Aug 2020 01:21:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXxepJrIFeD1mKO7HcTt4us9BbnF/UFTBMDxDoj671ASXsRbof0jcEpaHRyAgLHYXP/tQF X-Received: by 2002:a05:6402:a4c:: with SMTP id bt12mr18133577edb.360.1597738883696; Tue, 18 Aug 2020 01:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597738883; cv=none; d=google.com; s=arc-20160816; b=TC+d8PzLp826KJv4Vru194wnh+iV63oFMYyR7T8Ladr+vPMnI5nx8BPeW5mLl/sK4B LMkiaK7/thcLijEvhsmQ0YOpoNHzDOeuINt1NtyLQuZdWUOOdhYjLE/BuLVRF70jZ5NA Wm/r53jfvRztFndj65ow5hdpz9WPhAAUE0wPvrAlHHGS8/u7ZXkzkVTPGfYLR3AIG5Vu gG+1HajcjDoctMpmrzYfWQkHwUYelJXtE2K/3r6lhFCKnJPD6K8DltyHKI1rV/xpoWlg 4wwp5mznlKoTfv9YpYk+AiikgZzyjJqogWqToqSAMoMrUO0tfP4YcOdX+0dtb6ak7ICg Ki4Q== 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; bh=HWn318sR65zBumIU7mfEf89nVqPBNvvNUKcYTMnW/gw=; b=dPaINBN/hgaVNHDDDGO1rPruz66SDP9H2uKsKeswaRO4WvT8W2ctGzOxu0HOE+uABS NxvFyADwfPOQMy9eKWBtHHyKhggmeHcS20pJaUKp/RZeCFGoCvXxPQGIhZ44cdJG+K+8 CHNeOS7nBf/BrVGfTaEvOW9pf8XJJfB+lJJ7xrwnfToRmhu69OnEebmBBn+isLRw8r+W B0vbWzyalUtmHQ3auMowySKVmFOtb4stQSUtumc7/untHu8qU73fTDer8b9iqJzs/zr+ qJ6h3WZY2ftapNSuiWNEDhgqCiPhltLCWZwxHOsPtRbJAsfaGkJQXEYJ0Y/zydJKbSoc o0kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si12768263ejj.386.2020.08.18.01.20.59; Tue, 18 Aug 2020 01:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbgHRIUX (ORCPT + 99 others); Tue, 18 Aug 2020 04:20:23 -0400 Received: from smtp23.cstnet.cn ([159.226.251.23]:42334 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726043AbgHRIUW (ORCPT ); Tue, 18 Aug 2020 04:20:22 -0400 Received: from localhost (unknown [159.226.5.99]) by APP-03 (Coremail) with SMTP id rQCowACHjxs5jztfmH8kAw--.22912S2; Tue, 18 Aug 2020 16:20:09 +0800 (CST) From: Xu Wang To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, netdev@vger.kernel.org, bpf@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Xu Wang Subject: [PATCH] libbpf: simplify the return expression of build_map_pin_path() Date: Tue, 18 Aug 2020 08:20:08 +0000 Message-Id: <20200818082008.12143-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: rQCowACHjxs5jztfmH8kAw--.22912S2 X-Coremail-Antispam: 1UD129KBjvdXoWrGr48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vcSsGvfC2KfnxnUUI43ZEXa7x RM4E_DUUUUU== X-Originating-IP: [159.226.5.99] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCQUMA102ZgiJnQAAsS Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Xu Wang --- tools/lib/bpf/libbpf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5055e1531e43..b423fdaae0b6 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -1935,11 +1935,7 @@ static int build_map_pin_path(struct bpf_map *map, const char *path) else if (len >= PATH_MAX) return -ENAMETOOLONG; - err = bpf_map__set_pin_path(map, buf); - if (err) - return err; - - return 0; + return bpf_map__set_pin_path(map, buf); } -- 2.17.1