summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/tools/cpcgen/cpcgen.c7
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);
}