diff options
author | Dan McGee <dan@archlinux.org> | 2007-05-14 09:16:55 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-05-14 09:16:55 +0200 |
commit | 2bcecbd62cb2bda681a3aba46bb0bbf690ba7219 (patch) | |
tree | cc7f9d60e04c65453527354bbd18312a9c323ed4 /lib/libalpm/server.c | |
parent | 5c930c318e7b80af3a322ddc7ddf9fe100e9c16b (diff) | |
download | pacman-2bcecbd62cb2bda681a3aba46bb0bbf690ba7219.tar.gz pacman-2bcecbd62cb2bda681a3aba46bb0bbf690ba7219.tar.xz |
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/server.c')
-rw-r--r-- | lib/libalpm/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index c34c9215..1d972bdb 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -49,7 +49,7 @@ pmserver_t *_alpm_server_new(const char *url) ALPM_LOG_FUNC; - server = (pmserver_t *)malloc(sizeof(pmserver_t)); + server = malloc(sizeof(pmserver_t)); if(server == NULL) { _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmserver_t)); RET_ERR(PM_ERR_MEMORY, NULL); |