From patchwork Tue Jul 24 22:15:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 948878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Zt4p16mlz9s2g for ; Wed, 25 Jul 2018 08:16:58 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="AbleMZ1x"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Zt4n6c2yzDrTH for ; Wed, 25 Jul 2018 08:16:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="AbleMZ1x"; dkim-atps=neutral X-Original-To: Petitboot@lists.ozlabs.org Delivered-To: Petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=geoff@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="AbleMZ1x"; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41Zt3Q274dzDrdd for ; Wed, 25 Jul 2018 08:15:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Date:Cc:To:Subject:From:References: In-Reply-To:Message-Id:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=j6i2dtmluYYtoCfpSk+eksMm7HHXSw6RuRAzfRjzaow=; b=AbleMZ1xHGapq36JMuVd/w7H/ s+tBZDHR9c7BS5EiRiiCBgZGPEHK4xRxD/XTzMR8BMdyoIJu4Qtx/GncjLy7NTcBwI+kH3bC5WB36 MTuSvCd2/+XRCPFWso0L389RirW/AWwfSMyeC+dkSJv3IY6UQL0vwFx4rCoUKx1e2GIkhErgXFA8Y GqCRgRoemHqypOdT/jLuguj7iBXw+NlBCwfvznx0tG2d672DxTHrwTDiFKhfh3hifLJ2ZLbFqmNUz qLlL4RHSC5WLk8SCSbjOMXKOIPan82T+UVNFMK3EhPIeJzW7035Ykb6Yjd9g6VeinG1sLGWh5RnlM DqoWqFrug==; Received: from geoff by merlin.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fi5ao-0004l4-IK; Tue, 24 Jul 2018 22:15:42 +0000 Message-Id: <3584d1d987f08d24d38c142ea2875158780d6fcb.1532469861.git.geoff@infradead.org> In-Reply-To: References: From: Geoff Levand Patch-Date: Tue, 24 Jul 2018 15:03:16 -0700 Subject: [PATCH v1 18/30] discover/event: Rename param -> event_param To: Samuel Mendoza-Jonas Date: Tue, 24 Jul 2018 22:15:42 +0000 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ge Song , Petitboot@lists.ozlabs.org MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" To avoid name clash with other 'struct param'. Signed-off-by: Geoff Levand --- discover/event.c | 8 ++++---- discover/event.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/discover/event.c b/discover/event.c index ead2fda..ec5537a 100644 --- a/discover/event.c +++ b/discover/event.c @@ -80,7 +80,7 @@ static int event_parse_ad_header(char *buf, int len, enum event_action *action, static void event_parse_params(struct event *event, const char *buf, int len) { int param_len, name_len, value_len; - struct param *param; + struct event_param *param; char *sep; for (; len > 0; len -= param_len + 1, buf += param_len + 1) { @@ -95,7 +95,7 @@ static void event_parse_params(struct event *event, const char *buf, int len) /* update the params array */ event->params = talloc_realloc(event, event->params, - struct param, ++event->n_params); + struct event_param, ++event->n_params); param = &event->params[event->n_params - 1]; sep = memchr(buf, '=', param_len); @@ -150,7 +150,7 @@ const char *event_get_param(const struct event *event, const char *name) void event_set_param(struct event *event, const char *name, const char *value) { - struct param *param; + struct event_param *param; int i; /* if it's already present, replace the value of the old param */ @@ -165,7 +165,7 @@ void event_set_param(struct event *event, const char *name, const char *value) /* not found - create a new param */ event->params = talloc_realloc(event, event->params, - struct param, ++event->n_params); + struct event_param, ++event->n_params); param = &event->params[event->n_params - 1]; param->name = talloc_strdup(event, name); diff --git a/discover/event.h b/discover/event.h index 1f6966c..2d83ad9 100644 --- a/discover/event.h +++ b/discover/event.h @@ -23,7 +23,7 @@ struct event { enum event_action action; const char *device; - struct param { + struct event_param { char *name; char *value; } *params;