summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-10 20:28:31 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-10 20:28:31 -0300
commit6461152e588b4740ff896280bcf1d461af546f10 (patch)
tree992a9e7181d19f8931945d09a414abebb0fffb20 /main.c
parent1846b97fb6d234439a6a1e4ee34fad840d104ac0 (diff)
downloadeeshow-6461152e588b4740ff896280bcf1d461af546f10.tar.gz
eeshow-6461152e588b4740ff896280bcf1d461af546f10.tar.bz2
eeshow-6461152e588b4740ff896280bcf1d461af546f10.zip
eeshow/util.h (alloc_type_n): get rid of all these alloc_size(sizeof(foo), n)
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 841cbf7..6583e3f 100644
--- a/main.c
+++ b/main.c
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
unsigned n = argc - optind;
char **args;
- args = alloc_size(sizeof(char *) * n);
+ args = alloc_type_n(char *, n);
memcpy(args, argv + optind, sizeof(const char *) * n);
optind = 0; /* reset getopt */
@@ -192,14 +192,14 @@ int main(int argc, char **argv)
if (dashdash == argc) {
gfx_argc = 1;
- gfx_argv = alloc_size(sizeof(const char *) * 2);
+ gfx_argv = alloc_type_n(char *, 2);
gfx_argv[0] = (char *) (*ops)->name;
gfx_argv[1] = NULL;
} else {
gfx_argc = argc - dashdash - 1;
if (!gfx_argc)
usage(*argv);
- gfx_argv = alloc_size(sizeof(const char *) * (gfx_argc + 1));
+ gfx_argv = alloc_type_n(char *, gfx_argc + 1);
memcpy(gfx_argv, argv + dashdash + 1,
sizeof(const char *) * (gfx_argc + 1));