Skip to content

Commit

Permalink
FIXUP: Add comments about "casting away" const
Browse files Browse the repository at this point in the history
  • Loading branch information
ccollins476ad committed Feb 19, 2020
1 parent a366b07 commit 4a8c946
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/scfg/src/scfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ scfg_find_setting_by_name(const struct scfg_group *group,

SCFG_FOREACH_SETTING(group, setting) {
if (strcmp(setting->name, setting_name) == 0) {
/* Cast away const. */
return (struct scfg_setting *)setting;
}
}
Expand All @@ -77,6 +78,7 @@ scfg_find_setting_by_val(const struct scfg_group *group, const void *val)

SCFG_FOREACH_SETTING(group, setting) {
if (setting->val == val) {
/* Cast away const. */
return (struct scfg_setting *)setting;
}
}
Expand Down

0 comments on commit 4a8c946

Please sign in to comment.