discover/event: Rename param -> event_param
authorGeoff Levand <geoff@infradead.org>
Thu, 2 Aug 2018 17:29:37 +0000 (17:29 +0000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 7 Aug 2018 01:30:36 +0000 (11:30 +1000)
To avoid name clash with other 'struct param'.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/event.c
discover/event.h

index ead2fdad88833387768d1489f9cf6d161f35de2c..ec5537a0f4da301a751ea12413db0bf24269f460 100644 (file)
@@ -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);
index 1f6966c970ab54279b4d27747477dc1342b5a43d..2d83ad99b359b7a68a59d8c9e6ba36e9b9df6b05 100644 (file)
@@ -23,7 +23,7 @@ struct event {
        enum event_action action;
        const char *device;
 
-       struct param {
+       struct event_param {
                char *name;
                char *value;
        } *params;