Re: [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



On Thu, 2023-11-16 at 12:11 -0600, Gustavo A. R. Silva wrote:
 typedef struct PACKED_REGISTRY_TABLE
 {
-    NvU32                   size;
-    NvU32                   numEntries;
-    PACKED_REGISTRY_ENTRY   entries[0];
+       NvU32                   size;
+       NvU32                   numEntries;
+       PACKED_REGISTRY_ENTRY   entries[] __counted_by(numEntries);
 } PACKED_REGISTRY_TABLE;

Well, it's better than mine: https://lore.kernel.org/all/20231107234726.854248-1-ttabi@xxxxxxxxxx/T/

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux