diff options
author | Toomas Soome <tsoome@me.com> | 2019-12-26 09:23:25 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-01-29 23:48:15 +0200 |
commit | c6f039c73ee9eb7e4acb232afaca51cdf9d30ff3 (patch) | |
tree | 4906910bfbdbc344a6c48f8760f09be68e9ac7c4 /usr/src/uts/common/os/modsysfile.c | |
parent | 7093fd72e0be9a255aa4b1ed00a701f80699ac7d (diff) | |
download | illumos-joyent-c6f039c73ee9eb7e4acb232afaca51cdf9d30ff3.tar.gz |
12172 genunix: variable may be used uninitialized
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/os/modsysfile.c')
-rw-r--r-- | usr/src/uts/common/os/modsysfile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/common/os/modsysfile.c b/usr/src/uts/common/os/modsysfile.c index de5c106782..7875824a86 100644 --- a/usr/src/uts/common/os/modsysfile.c +++ b/usr/src/uts/common/os/modsysfile.c @@ -3142,12 +3142,14 @@ process_rtc_config_file(void) static void append(struct hwc_spec *spec, struct par_list *par) { - struct hwc_spec *hwc, *last; + struct hwc_spec *hwc, *last = NULL; ASSERT(par->par_specs); for (hwc = par->par_specs; hwc; hwc = hwc->hwc_next) last = hwc; - last->hwc_next = spec; + + if (last != NULL) + last->hwc_next = spec; } /* |