Gustavo A. R. Silva
7649773293
cxgb3/l2t: Fix undefined behaviour
...
The use of zero-sized array causes undefined behaviour when it is not
the last member in a structure. As it happens to be in this case.
Also, the current code makes use of a language extension to the C90
standard, but the preferred mechanism to declare variable-length
types such as this one is a flexible array member, introduced in
C99:
struct foo {
int stuff;
struct boo array[];
};
By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last. Which is beneficial
to cultivate a high-quality code.
Fixes: e48f129c2f ("[SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereference")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2019-04-01 15:01:46 -07:00
..
2019-03-19 22:34:21 +01:00
2019-02-26 11:23:49 +00:00
2019-02-19 14:50:11 +01:00
2019-03-09 16:53:47 -08:00
2019-03-17 08:48:45 +01:00
2019-03-22 12:08:52 -07:00
2019-03-27 17:37:58 -07:00
2019-03-02 19:51:23 +01:00
2019-03-06 09:41:12 -08:00
2019-03-10 17:37:29 -07:00
2019-03-14 08:46:17 -07:00
2019-03-24 11:30:11 +01:00
2019-03-08 15:06:38 -08:00
2019-03-12 09:47:30 +01:00
2019-03-12 23:46:55 +01:00
2019-03-13 09:51:17 -07:00
2019-03-16 13:05:32 -07:00
2019-03-14 09:11:54 -07:00
2019-03-08 09:11:39 -08:00
2019-03-12 10:04:02 -07:00
2019-03-09 14:57:08 -08:00
2019-03-22 12:08:44 +10:00
2019-03-05 15:43:05 +01:00
2019-03-06 14:18:59 -08:00
2019-02-25 09:06:00 -08:00
2019-03-15 14:37:46 -07:00
2019-03-13 18:07:10 +01:00
2019-03-04 19:05:02 -08:00
2019-03-11 09:34:00 -07:00
2019-03-08 10:02:58 -08:00
2019-03-29 10:53:45 -07:00
2019-03-11 10:57:11 -07:00
2019-03-22 12:02:27 +01:00
2019-03-21 16:43:00 +01:00
2019-03-20 12:25:59 -07:00
2019-03-10 13:16:37 -07:00
2019-03-07 08:59:26 -07:00
2019-03-12 10:04:02 -07:00
2019-03-11 02:51:43 -05:00
2019-03-16 12:36:39 -07:00
2019-03-10 11:54:48 -07:00
2019-03-10 11:54:48 -07:00
2019-03-09 15:53:03 -08:00
2019-03-21 11:41:46 +01:00
2019-03-13 09:34:35 -07:00
2019-04-01 15:01:46 -07:00
2019-03-15 14:32:59 -07:00
2019-03-16 13:05:32 -07:00
2019-03-16 12:36:39 -07:00
2019-03-06 14:18:59 -08:00
2019-03-12 10:04:02 -07:00
2019-03-12 09:45:56 +01:00
2019-03-10 11:54:48 -07:00
2019-03-25 14:49:00 -07:00
2019-03-10 12:29:52 -07:00
2019-03-10 10:17:23 -07:00
2019-03-08 08:23:15 -08:00
2019-03-11 11:12:50 -07:00
2019-03-19 11:28:15 -07:00
2019-02-24 21:12:01 +01:00
2019-02-20 00:41:01 +01:00
2019-03-05 14:08:26 -08:00
2019-03-04 12:52:49 +01:00
2019-03-07 18:32:02 -08:00
2019-03-04 00:01:08 +00:00
2019-03-14 09:00:06 -07:00
2019-02-20 21:15:54 -08:00
2019-03-12 09:46:32 -07:00
2019-03-28 12:57:24 -07:00
2019-03-20 20:13:17 -04:00
2019-03-06 09:41:12 -08:00
2019-03-09 14:57:08 -08:00
2019-03-20 11:18:55 -07:00
2019-03-27 17:37:58 -07:00
2019-03-06 09:41:12 -08:00
2019-03-18 22:37:44 +08:00
2019-03-14 09:11:54 -07:00
2019-03-12 10:04:02 -07:00
2019-03-07 12:56:26 -08:00
2019-03-10 12:47:57 -07:00
2019-03-15 14:22:59 -07:00
2019-02-27 16:00:20 +01:00
2019-03-06 11:19:57 -05:00
2019-03-11 11:22:15 -07:00
2019-03-15 15:35:35 +01:00
2019-03-10 12:29:52 -07:00