Skip to content

Commit

Permalink
Merge pull request #94 from carloslack/kvdev
Browse files Browse the repository at this point in the history
Reduce scope of local var
  • Loading branch information
carloslack authored May 23, 2024
2 parents f3a04f2 + 98f0812 commit 9dcb24a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lkm.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ static struct _kv_hide_ps_on_load kv_hide_ps_on_load[] = {
* Helper that returns the list of names to hide on load
*/
static inline const char **kv_get_hide_ps_names(void) {
int i;
// XXX: using fixed maxsize kv_hide_ps_on_load now
static const char *names[256];
// XXX: using fixed maxsize kv_hide_ps_on_load for now
static const char *names[32];
if (!*names) {
size_t maxnames = sizeof(names) / sizeof(names[0]);
for (i = 0; i < maxnames && kv_hide_ps_on_load[i].name != NULL; ++i) {
int i = 0;
size_t maxnames = sizeof(names) / sizeof(*names);
for (; i < maxnames && kv_hide_ps_on_load[i].name != NULL; ++i) {
names[i] = kv_hide_ps_on_load[i].name;
}
}
Expand Down

0 comments on commit 9dcb24a

Please sign in to comment.