From 3a2858a2fddfa306f9b37ed02055eb75c7f89dea Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 24 Apr 2020 09:05:25 +0200 Subject: ifcfg-rh/trivial: drop comment for nms_ifcfg_well_known_keys The comment isn't right. The fixed array size is in the header file, because other parts of the code need to know how many elements are in the array. The alternative would be a define for the size, but that is only redundant information. Also, even with a define the user who adds an entry needs to adjust the code in the header. Explicitly stating the array size in the header makes it almost impossible to accidentally choosing the wrong size, because the compiler (and unit tests) ensure the consistency. --- src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h index 25a5c0ac73..e6343e1dcd 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h @@ -33,7 +33,6 @@ typedef struct { NMSIfcfgKeyTypeFlags key_flags; } NMSIfcfgKeyTypeInfo; -/* maybe think about getting rid of the fixed number below at some point.*/ extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[233]; const NMSIfcfgKeyTypeInfo *nms_ifcfg_well_known_key_find_info (const char *key, gssize *out_idx); -- cgit v1.2.1