From 91594a1ef895a6e47ece299b762d5476f1bca348 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 25 Mar 2011 11:57:20 -0400 Subject: style cleanup: cast as (type *) not (type*) Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- lib/libalpm/be_package.c | 2 +- lib/libalpm/db.c | 2 +- lib/libalpm/dload.c | 2 +- lib/libalpm/package.c | 2 +- lib/libalpm/pkghash.c | 2 +- lib/libalpm/remove.c | 2 +- lib/libalpm/signing.c | 2 +- lib/libalpm/sync.c | 2 +- lib/libalpm/util.c | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 91129127..4ac9c5ad 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -91,7 +91,7 @@ static void *_package_changelog_open(pmpkg_t *pkg) static size_t _package_changelog_read(void *ptr, size_t size, const pmpkg_t *pkg, const void *fp) { - ssize_t sret = archive_read_data((struct archive*)fp, ptr, size); + ssize_t sret = archive_read_data((struct archive *)fp, ptr, size); /* Report error (negative values) */ if(sret < 0) { pm_errno = PM_ERR_LIBARCHIVE; diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 18ad2d79..fab1945f 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -205,7 +205,7 @@ const char SYMEXPORT *alpm_db_get_url(const pmdb_t *db) ASSERT(db != NULL, return NULL); ASSERT(db->servers != NULL, return NULL); - url = (char*)db->servers->data; + url = (char *)db->servers->data; return url; } diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index b96ca162..5347b9bb 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -192,7 +192,7 @@ static int curl_download_internal(const char *url, const char *localpath, curl_easy_setopt(handle->curl, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(handle->curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(handle->curl, CURLOPT_PROGRESSFUNCTION, curl_progress); - curl_easy_setopt(handle->curl, CURLOPT_PROGRESSDATA, (void*)&dlfile); + curl_easy_setopt(handle->curl, CURLOPT_PROGRESSDATA, (void *)&dlfile); useragent = getenv("HTTP_USER_AGENT"); if (useragent != NULL) { diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 9e1dbd52..035ff170 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -203,7 +203,7 @@ const char SYMEXPORT *alpm_pkg_get_md5sum(pmpkg_t *pkg) static int decode_pgpsig(pmpkg_t *pkg) { int len = strlen(pkg->pgpsig.encdata); - const unsigned char *usline = (const unsigned char*)pkg->pgpsig.encdata; + const unsigned char *usline = (const unsigned char *)pkg->pgpsig.encdata; int destlen = 0; /* get the necessary size for the buffer by passing 0 */ int ret = base64_decode(NULL, &destlen, usline, len); diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c index b4dfcb6a..f4153300 100644 --- a/lib/libalpm/pkghash.c +++ b/lib/libalpm/pkghash.c @@ -75,7 +75,7 @@ pmpkghash_t *_alpm_pkghash_create(size_t size) return NULL; } - CALLOC(hash->hash_table, hash->buckets, sizeof(alpm_list_t*), \ + CALLOC(hash->hash_table, hash->buckets, sizeof(alpm_list_t *), \ free(hash); RET_ERR(PM_ERR_MEMORY, NULL)); return hash; diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index ef9d40e1..b08a925f 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -378,7 +378,7 @@ int _alpm_remove_packages(pmtrans_t *trans, pmdb_t *db) for(targ = trans->remove; targ; targ = targ->next) { int position = 0; char scriptlet[PATH_MAX]; - info = (pmpkg_t*)targ->data; + info = (pmpkg_t *)targ->data; const char *pkgname = NULL; size_t targcount = alpm_list_count(targ); diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index c30650b1..2301bba4 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -140,7 +140,7 @@ int _alpm_gpgme_checksig(const char *path, const pmpgpsig_t *sig) CHECK_ERR(); /* next create data object for the signature */ - err = gpgme_data_new_from_mem(&sigdata, (char*)sig->rawdata, sig->rawlen, 0); + err = gpgme_data_new_from_mem(&sigdata, (char *)sig->rawdata, sig->rawlen, 0); CHECK_ERR(); /* here's where the magic happens */ diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 9f906d39..a8284987 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -681,7 +681,7 @@ static int test_md5sum(pmtrans_t *trans, const char *filepath, int ret = _alpm_test_md5sum(filepath, md5sum); if(ret == 1) { int doremove = 0; - QUESTION(trans, PM_TRANS_CONV_CORRUPTED_PKG, (char*)filepath, + QUESTION(trans, PM_TRANS_CONV_CORRUPTED_PKG, (char *)filepath, NULL, NULL, &doremove); if(doremove) { unlink(filepath); diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 28cf8e51..0a9dde2a 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -573,7 +573,7 @@ char *_alpm_filecache_find(const char* filename) /* Loop through the cache dirs until we find a matching file */ for(i = alpm_option_get_cachedirs(); i; i = alpm_list_next(i)) { - snprintf(path, PATH_MAX, "%s%s", (char*)alpm_list_getdata(i), + snprintf(path, PATH_MAX, "%s%s", (char *)alpm_list_getdata(i), filename); if(stat(path, &buf) == 0 && S_ISREG(buf.st_mode)) { retpath = strdup(path); @@ -753,7 +753,7 @@ int _alpm_archive_fgets(struct archive *a, struct archive_read_buffer *b) } /* zero-copy - this is the entire next block of data. */ - b->ret = archive_read_data_block(a, (void*)&b->block, + b->ret = archive_read_data_block(a, (void *)&b->block, &b->block_size, &offset); b->block_offset = b->block; -- cgit v1.2.3-70-g09d2