tty: clearify structure initializer in notify_write()
authorMathias Krause <minipli@googlemail.com>
Sat, 30 Jul 2011 12:01:59 +0000 (14:01 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 17:48:30 +0000 (10:48 -0700)
Even though this is valid C we should not mix C99 initializers with
obfuscated ANSI C. Stick to C99 and initialize c by its name.

Found by clang:
drivers/tty/vt/vt.c:262:55: warning: explicitly assigning a variable of
type 'unsigned int' to itself [-Wself-assign]
    struct vt_notifier_param param = { .vc = vc, unicode = unicode };
                                                 ~~~~~~~ ^ ~~~~~~~

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/vt/vt.c

index b3915b7ad3e2facb654dbd50114623f01996f431..e716839fab6ee428af8f4262433ba5b6c76be3e2 100644 (file)
@@ -259,7 +259,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier);
 
 static void notify_write(struct vc_data *vc, unsigned int unicode)
 {
-       struct vt_notifier_param param = { .vc = vc, unicode = unicode };
+       struct vt_notifier_param param = { .vc = vc, .c = unicode };
        atomic_notifier_call_chain(&vt_notifier_list, VT_WRITE, &param);
 }