diff options
author | John Levon <john.levon@joyent.com> | 2019-06-05 03:13:11 -0700 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2019-06-06 03:04:39 -0700 |
commit | 00fc50d191cf90458c41a077d59fe2f81223f00a (patch) | |
tree | ad8080629be992195767050caad10caebfc96b95 | |
parent | 726d8a6eb1683fac6b175317648eb4f4c36cb5a9 (diff) | |
download | illumos-gate-00fc50d191cf90458c41a077d59fe2f81223f00a.tar.gz |
11200 cpcgen needs smatch fixes again
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/tools/cpcgen/cpcgen.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/src/tools/cpcgen/cpcgen.c b/usr/src/tools/cpcgen/cpcgen.c index 1e76e10351..b2a6a58334 100644 --- a/usr/src/tools/cpcgen/cpcgen.c +++ b/usr/src/tools/cpcgen/cpcgen.c @@ -10,7 +10,7 @@ */ /* - * Copyright (c) 2019, Joyent, Inc. + * Copyright 2019, Joyent, Inc. */ /* @@ -419,13 +419,13 @@ cpcgen_parse_model(char *fsr, uint_t *family, uint_t *model, uint_t *nstepp, errno = 0; l = strtol(fam, &last, 16); - if (errno != 0 || l < 0 || l > UINT_MAX || *last != '\0') { + if (errno != 0 || l < 0 || l >= INT_MAX || *last != '\0') { errx(EXIT_FAILURE, "failed to parse family \"%s\"", fam); } *family = (uint_t)l; l = strtol(mod, &last, 16); - if (errno != 0 || l < 0 || l > UINT_MAX || *last != '\0') { + if (errno != 0 || l < 0 || l >= INT_MAX || *last != '\0') { errx(EXIT_FAILURE, "failed to parse model \"%s\"", mod); } *model = (uint_t)l; @@ -892,7 +892,6 @@ cpcgen_manual_intel_file_before(FILE *f, cpc_map_t *map) return (B_FALSE); } - free(upper); return (B_TRUE); } |