You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

  1. From d4ed4972df1ffe9381e33f2800f8e574f632948c Mon Sep 17 00:00:00 2001
  2. From: rpm-build <rpm-build>
  3. Date: Mon, 2 Mar 2020 15:21:30 -0800
  4. Subject: [PATCH 1/1] iscsi_if.h replace zero-length array with flexible-array
  5. member
  6. ---
  7. include/iscsi_if.h | 10 +++++-----
  8. 1 file changed, 5 insertions(+), 5 deletions(-)
  9. diff --git a/include/iscsi_if.h b/include/iscsi_if.h
  10. index 2d46214..e8cee0d 100644
  11. --- a/include/iscsi_if.h
  12. +++ b/include/iscsi_if.h
  13. @@ -337,7 +337,7 @@ enum iscsi_param_type {
  14. struct iscsi_param_info {
  15. uint32_t len; /* Actual length of the param value */
  16. uint16_t param; /* iscsi param */
  17. - uint8_t value[0]; /* length sized value follows */
  18. + uint8_t value[]; /* length sized value follows */
  19. } __attribute__((__packed__));
  20. struct iscsi_iface_param_info {
  21. @@ -346,7 +346,7 @@ struct iscsi_iface_param_info {
  22. uint16_t param; /* iscsi param value */
  23. uint8_t iface_type; /* IPv4 or IPv6 */
  24. uint8_t param_type; /* iscsi_param_type */
  25. - uint8_t value[0]; /* length sized value follows */
  26. + uint8_t value[]; /* length sized value follows */
  27. } __attribute__((__packed__));
  28. /*
  29. @@ -723,7 +723,7 @@ enum iscsi_flashnode_param {
  30. struct iscsi_flashnode_param_info {
  31. uint32_t len; /* Actual length of the param */
  32. uint16_t param; /* iscsi param value */
  33. - uint8_t value[0]; /* length sized value follows */
  34. + uint8_t value[]; /* length sized value follows */
  35. } __attribute__((__packed__));
  36. enum iscsi_discovery_parent_type {
  37. @@ -841,7 +841,7 @@ struct iscsi_stats {
  38. * up to ISCSI_STATS_CUSTOM_MAX
  39. */
  40. uint32_t custom_length;
  41. - struct iscsi_stats_custom custom[0]
  42. + struct iscsi_stats_custom custom[]
  43. __attribute__ ((aligned (sizeof(uint64_t))));
  44. };
  45. @@ -972,7 +972,7 @@ struct iscsi_offload_host_stats {
  46. * up to ISCSI_HOST_STATS_CUSTOM_MAX
  47. */
  48. uint32_t custom_length;
  49. - struct iscsi_host_stats_custom custom[0]
  50. + struct iscsi_host_stats_custom custom[]
  51. __attribute__ ((aligned (sizeof(uint64_t))));
  52. };
  53. --
  54. 2.21.1