diff options
Diffstat (limited to 'src/scanopt.c')
-rw-r--r-- | src/scanopt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scanopt.c b/src/scanopt.c index d829d0f..a118541 100644 --- a/src/scanopt.c +++ b/src/scanopt.c @@ -157,7 +157,7 @@ scanopt_t *scanopt_init (const optspec_t *options, int argc, char **argv, int fl s->optc++; /* Build auxiliary data */ - s->aux = malloc(s->optc * sizeof (struct _aux)); + s->aux = malloc((size_t) s->optc * sizeof (struct _aux)); for (i = 0; i < s->optc; i++) { const unsigned char *p, *pname; @@ -261,7 +261,7 @@ int scanopt_usage (scanopt_t *scanner, FILE *fp, const char *usage) fprintf (fp, "\n"); /* Sort by r_val and string. Yes, this is O(n*n), but n is small. */ - store = malloc(s->optc * sizeof (usg_elem)); + store = malloc((size_t) s->optc * sizeof (usg_elem)); for (i = 0; i < s->optc; i++) { /* grab the next preallocate node. */ |