mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-29 21:24:01 +00:00
kstat: silence "maybe uninitialized" warnings
Firmly in the "shouldn't happen" camp, but at least GCC 7.4 (Ubuntu 18.04) complained about them, and it's easy to shut up, so do so. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17189
This commit is contained in:
parent
5b29e70ae1
commit
75e921da6f
@ -395,7 +395,7 @@ kstat_delete_module(kstat_module_t *module)
|
|||||||
|
|
||||||
kstat_module_t *parent = module->ksm_parent;
|
kstat_module_t *parent = module->ksm_parent;
|
||||||
|
|
||||||
char *p = module->ksm_name, *frag;
|
char *p = module->ksm_name, *frag = NULL;
|
||||||
while (p != NULL && (frag = strsep(&p, "/"))) {}
|
while (p != NULL && (frag = strsep(&p, "/"))) {}
|
||||||
|
|
||||||
remove_proc_entry(frag, parent ? parent->ksm_proc : proc_spl_kstat);
|
remove_proc_entry(frag, parent ? parent->ksm_proc : proc_spl_kstat);
|
||||||
@ -420,7 +420,7 @@ kstat_create_module(char *name)
|
|||||||
|
|
||||||
(void) strlcpy(buf, name, KSTAT_STRLEN);
|
(void) strlcpy(buf, name, KSTAT_STRLEN);
|
||||||
|
|
||||||
parent = NULL;
|
module = parent = NULL;
|
||||||
char *p = buf, *frag;
|
char *p = buf, *frag;
|
||||||
while ((frag = strsep(&p, "/")) != NULL) {
|
while ((frag = strsep(&p, "/")) != NULL) {
|
||||||
module = kstat_find_module(buf);
|
module = kstat_find_module(buf);
|
||||||
@ -454,7 +454,6 @@ kstat_create_module(char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (module);
|
return (module);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user