tty:vt remove obsolete struct initializer
authorPeng Fan <van.freenix@gmail.com>
Sun, 26 Oct 2014 12:08:02 +0000 (20:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 04:22:47 +0000 (20:22 -0800)
This patch fixes sparse warning:
"obsolete struct initializer, use C99 syntax"

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c

index 3dc5d56261a5564945012ea0184b90fd78097c9c..43c2c2495907398ac7a72b1cf41bb97be390d4d1 100644 (file)
@@ -1367,9 +1367,11 @@ static void csi_m(struct vc_data *vc)
                                                rgb_from_256(vc->vc_par[i]));
                                } else if (vc->vc_par[i] == 2 &&  /* 24 bit */
                                           i <= vc->vc_npar + 3) {/* extremely rare */
-                                       struct rgb c = {r:vc->vc_par[i+1],
-                                                       g:vc->vc_par[i+2],
-                                                       b:vc->vc_par[i+3]};
+                                       struct rgb c = {
+                                               .r = vc->vc_par[i + 1],
+                                               .g = vc->vc_par[i + 2],
+                                               .b = vc->vc_par[i + 3],
+                                       };
                                        rgb_foreground(vc, c);
                                        i += 3;
                                }
@@ -1388,9 +1390,11 @@ static void csi_m(struct vc_data *vc)
                                                rgb_from_256(vc->vc_par[i]));
                                } else if (vc->vc_par[i] == 2 && /* 24 bit */
                                           i <= vc->vc_npar + 3) {
-                                       struct rgb c = {r:vc->vc_par[i+1],
-                                                       g:vc->vc_par[i+2],
-                                                       b:vc->vc_par[i+3]};
+                                       struct rgb c = {
+                                               .r = vc->vc_par[i + 1],
+                                               .g = vc->vc_par[i + 2],
+                                               .b = vc->vc_par[i + 3],
+                                       };
                                        rgb_background(vc, c);
                                        i += 3;
                                }