提交 502fcb79 编写于 作者: M Mathias Krause 提交者: Greg Kroah-Hartman

tty: clearify structure initializer in notify_write()

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: NMathias Krause <minipli@googlemail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0c6967b5
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册