From patchwork Wed Oct 10 20:47:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10635253 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC8BF69B1 for ; Wed, 10 Oct 2018 20:48:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEAAD2A6E0 for ; Wed, 10 Oct 2018 20:48:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A29192A7F4; Wed, 10 Oct 2018 20:48:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 839EC2A751 for ; Wed, 10 Oct 2018 20:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725888AbeJKEMO (ORCPT ); Thu, 11 Oct 2018 00:12:14 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:14462 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725841AbeJKEMO (ORCPT ); Thu, 11 Oct 2018 00:12:14 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 1094440612; Wed, 10 Oct 2018 22:48:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id iGH2dpQXmEXA; Wed, 10 Oct 2018 22:48:18 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 1/2] iw: Make input to mac_addr_n2a() const Date: Wed, 10 Oct 2018 22:47:46 +0200 Message-Id: <20181010204747.1555-1-hauke@hauke-m.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The parameter is not modified, so we can make it constant. This makes it possible to provide other const parameters to this function. Signed-off-by: Hauke Mehrtens --- iw.h | 2 +- util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iw.h b/iw.h index 47aa27d..bdd39ee 100644 --- a/iw.h +++ b/iw.h @@ -175,7 +175,7 @@ int valid_handler(struct nl_msg *msg, void *arg); void register_handler(int (*handler)(struct nl_msg *, void *), void *data); int mac_addr_a2n(unsigned char *mac_addr, char *arg); -void mac_addr_n2a(char *mac_addr, unsigned char *arg); +void mac_addr_n2a(char *mac_addr, const unsigned char *arg); int parse_hex_mask(char *hexmask, unsigned char **result, size_t *result_len, unsigned char **mask); unsigned char *parse_hex(char *hex, size_t *outlen); diff --git a/util.c b/util.c index 5b286b7..796549e 100644 --- a/util.c +++ b/util.c @@ -5,7 +5,7 @@ #include "iw.h" #include "nl80211.h" -void mac_addr_n2a(char *mac_addr, unsigned char *arg) +void mac_addr_n2a(char *mac_addr, const unsigned char *arg) { int i, l;