summaryrefslogtreecommitdiff
path: root/src/scanopt.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville@mykolab.com>2015-12-07 19:44:10 -0500
committerWill Estes <westes575@gmail.com>2015-12-07 21:28:21 -0500
commitc03bef5411d3231f42445932d1971d656f020817 (patch)
tree90040d0915d1bd68db3a70fc011d56135909eaaa /src/scanopt.c
parent53e3088d75eb966101e4f229a0fe8e0fdd73ab7e (diff)
Remove allocation casts
Diffstat (limited to 'src/scanopt.c')
-rw-r--r--src/scanopt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scanopt.c b/src/scanopt.c
index 2fe33f6..b59bb13 100644
--- a/src/scanopt.c
+++ b/src/scanopt.c
@@ -151,7 +151,7 @@ scanopt_t *scanopt_init (const optspec_t *options, int argc, char **argv, int fl
{
int i;
struct _scanopt_t *s;
- s = (struct _scanopt_t *) malloc (sizeof (struct _scanopt_t));
+ s = malloc(sizeof (struct _scanopt_t));
s->options = options;
s->optc = 0;
@@ -170,7 +170,7 @@ scanopt_t *scanopt_init (const optspec_t *options, int argc, char **argv, int fl
s->optc++;
/* Build auxiliary data */
- s->aux = (struct _aux *) malloc (s->optc * sizeof (struct _aux));
+ s->aux = malloc(s->optc * sizeof (struct _aux));
for (i = 0; i < s->optc; i++) {
const unsigned char *p, *pname;
@@ -274,7 +274,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 = (usg_elem *) malloc (s->optc * sizeof (usg_elem));
+ store = malloc(s->optc * sizeof (usg_elem));
for (i = 0; i < s->optc; i++) {
/* grab the next preallocate node. */