]> git.ozlabs.org Git - petitboot/commitdiff
event: Make strings const
authorGeoff Levand <geoff@infradead.org>
Mon, 22 Apr 2013 00:49:37 +0000 (17:49 -0700)
committerGeoff Levand <geoff@infradead.org>
Sun, 28 Apr 2013 19:34:05 +0000 (12:34 -0700)
The processing of events does not modify the event strings, so change the
strings in struct event to const (read-only).

Signed-off-by: Geoff Levand <geoff@infradead.org>
discover/event.h

index 91575ccd0de02004b94ff032566841e7c528e1b3..900ced892d11738939dad4381fd4241c4c7208ca 100644 (file)
@@ -16,11 +16,11 @@ enum event_action {
 struct event {
        enum event_type type;
        enum event_action action;
 struct event {
        enum event_type type;
        enum event_action action;
-       char *device;
+       const char *device;
 
        struct param {
 
        struct param {
-               char *name;
-               char *value;
+               const char *name;
+               const char *value;
        } *params;
        int n_params;
 };
        } *params;
        int n_params;
 };