From 49c9ace57166a4014fafa36ff5cb373846a9b4cf Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 14 Aug 2022 11:54:50 -0700 Subject: Remove obsolete casts on calloc & malloc calls Not needed in C89 and later Signed-off-by: Alan Coopersmith --- viewres.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'viewres.c') diff --git a/viewres.c b/viewres.c index 6a764a7..cc76fbf 100644 --- a/viewres.c +++ b/viewres.c @@ -299,9 +299,7 @@ set_resource_labels(XmuWidgetNode *node) ViewresData *d = VData(node); if (!d->resource_labels) { - d->resource_labels = - (const char **) calloc((unsigned) d->nnew * 3, - (unsigned) sizeof(const char *)); + d->resource_labels = calloc(d->nnew * 3, sizeof(const char *)); if (!d->resource_labels) return FALSE; } @@ -338,7 +336,7 @@ set_resource_labels(XmuWidgetNode *node) static ViewresData * create_viewres_data(XmuWidgetNode *node) { - ViewresData *d = (ViewresData *) malloc((unsigned) sizeof(ViewresData)); + ViewresData *d = malloc(sizeof(ViewresData)); if (d) { d->resource_labels = NULL; -- cgit v1.2.3