diff options
Diffstat (limited to 'contrib/ncurses/form/fty_enum.c')
-rw-r--r-- | contrib/ncurses/form/fty_enum.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/ncurses/form/fty_enum.c b/contrib/ncurses/form/fty_enum.c index 054cc4d..c96a080 100644 --- a/contrib/ncurses/form/fty_enum.c +++ b/contrib/ncurses/form/fty_enum.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.20 2006/04/22 21:33:05 tom Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.22 2007/10/13 19:32:26 tom Exp $") typedef struct { @@ -56,7 +56,7 @@ enumARG; static void * Make_Enum_Type(va_list *ap) { - enumARG *argp = (enumARG *)malloc(sizeof(enumARG)); + enumARG *argp = typeMalloc(enumARG, 1); if (argp) { @@ -64,6 +64,7 @@ Make_Enum_Type(va_list *ap) char **kp = (char **)0; int ccase, cunique; + T((T_CREATE("enumARG %p"), argp)); argp->kwds = va_arg(*ap, char **); ccase = va_arg(*ap, int); cunique = va_arg(*ap, int); @@ -96,10 +97,13 @@ Copy_Enum_Type(const void *argp) { const enumARG *ap = (const enumARG *)argp; - result = (enumARG *)malloc(sizeof(enumARG)); + result = typeMalloc(enumARG, 1); if (result) - *result = *ap; + { + T((T_CREATE("enumARG %p"), result)); + *result = *ap; + } } return (void *)result; } |