From patchwork Wed Oct 20 11:16:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 71900 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id CA1341359B3 for ; Wed, 20 Oct 2010 13:18:58 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id B408B348C9D1 for ; Wed, 20 Oct 2010 13:18:58 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 20 Oct 2010 13:18:58 +0200 (CEST) Received: from murder ([192.168.6.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 20 Oct 2010 13:17:36 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Wed, 20 Oct 2010 13:17:35 +0200 Received: from scanner-4.m-online.net (scanner-4.mail.m-online.net [192.168.1.18]) by mail.m-online.net (Postfix) with ESMTP id BFD901C000B3; Wed, 20 Oct 2010 13:17:35 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-1.m-online.net (Postfix) with ESMTP id 3F62A46C0BC; Wed, 20 Oct 2010 13:17:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A2F3282F3; Wed, 20 Oct 2010 13:17:24 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iPivGqd9KPAt; Wed, 20 Oct 2010 13:17:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AFD7A282F4; Wed, 20 Oct 2010 13:17:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4604C282F2 for ; Wed, 20 Oct 2010 13:17:17 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UIqrc+OIOAVC for ; Wed, 20 Oct 2010 13:17:17 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id CEC76282F3 for ; Wed, 20 Oct 2010 13:17:12 +0200 (CEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 5460E1B4095; Wed, 20 Oct 2010 11:17:10 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de, Ben Warren Date: Wed, 20 Oct 2010 07:16:48 -0400 Message-Id: <1287573408-6494-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.1 Subject: [U-Boot] [PATCH] string_to_VLAN: constify "var" arg X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net Signed-off-by: Mike Frysinger --- include/net.h | 2 +- net/net.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net.h b/include/net.h index dd673f0..5e3495b 100644 --- a/include/net.h +++ b/include/net.h @@ -520,7 +520,7 @@ extern IPaddr_t string_to_ip(char *s); extern void VLAN_to_string (ushort x, char *s); /* Convert a string to a vlan id */ -extern ushort string_to_VLAN(char *s); +extern ushort string_to_VLAN(const char *s); /* read a VLAN id from an environment variable */ extern ushort getenv_VLAN(char *); diff --git a/net/net.c b/net/net.c index 7576419..a609632 100644 --- a/net/net.c +++ b/net/net.c @@ -1913,7 +1913,7 @@ void VLAN_to_string(ushort x, char *s) sprintf(s, "%d", x & VLAN_IDMASK); } -ushort string_to_VLAN(char *s) +ushort string_to_VLAN(const char *s) { ushort id;