From 2bcecbd62cb2bda681a3aba46bb0bbf690ba7219 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 14 May 2007 03:16:55 -0400 Subject: Remove unnecessary casts on malloc and elsewhere We had many unnecessary casts, most of them dealing with malloc and other memory allocations. The variable type should take care of it; no need to do it explicitly. In addition, I caught a const error while removing the casts. Signed-off-by: Dan McGee --- lib/libalpm/handle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/handle.c') diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index cbbdeff5..47abcb32 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -45,7 +45,7 @@ pmhandle_t *_alpm_handle_new() { pmhandle_t *handle; - handle = (pmhandle_t *)malloc(sizeof(pmhandle_t)); + handle = malloc(sizeof(pmhandle_t)); if(handle == NULL) { _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmhandle_t)); RET_ERR(PM_ERR_MEMORY, NULL); -- cgit v1.2.3-70-g09d2