tree-wide: remove unnecessary __UNCONST usage.
This commit is contained in:
parent
1e39f21f51
commit
47df729bcc
@ -30,10 +30,6 @@
|
|||||||
|
|
||||||
#include "../xbps-install/defs.h"
|
#include "../xbps-install/defs.h"
|
||||||
|
|
||||||
#ifndef __UNCONST
|
|
||||||
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* from show-deps.c */
|
/* from show-deps.c */
|
||||||
int show_pkg_deps(struct xbps_handle *, const char *, bool, bool);
|
int show_pkg_deps(struct xbps_handle *, const char *, bool, bool);
|
||||||
int show_pkg_revdeps(struct xbps_handle *, const char *, bool);
|
int show_pkg_revdeps(struct xbps_handle *, const char *, bool);
|
||||||
|
@ -60,10 +60,6 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __UNCONST
|
|
||||||
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _XBPS_RINDEX "xbps-rindex"
|
#define _XBPS_RINDEX "xbps-rindex"
|
||||||
|
|
||||||
/* From index-add.c */
|
/* From index-add.c */
|
||||||
|
@ -51,7 +51,7 @@ set_extract_flags(uid_t euid)
|
|||||||
static bool
|
static bool
|
||||||
match_preserved_file(struct xbps_handle *xhp, const char *entry)
|
match_preserved_file(struct xbps_handle *xhp, const char *entry)
|
||||||
{
|
{
|
||||||
char *file;
|
const char *file;
|
||||||
|
|
||||||
if (xhp->preserved_files == NULL)
|
if (xhp->preserved_files == NULL)
|
||||||
return false;
|
return false;
|
||||||
@ -60,7 +60,7 @@ match_preserved_file(struct xbps_handle *xhp, const char *entry)
|
|||||||
file = strchr(entry, '.') + 1;
|
file = strchr(entry, '.') + 1;
|
||||||
assert(file);
|
assert(file);
|
||||||
} else {
|
} else {
|
||||||
file = __UNCONST(entry);
|
file = entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xbps_match_string_in_array(xhp->preserved_files, file);
|
return xbps_match_string_in_array(xhp->preserved_files, file);
|
||||||
|
@ -83,7 +83,7 @@ xbps_pubkey2fp(struct xbps_handle *xhp, xbps_data_t pubkey)
|
|||||||
mdctx = EVP_MD_CTX_new();
|
mdctx = EVP_MD_CTX_new();
|
||||||
assert(mdctx);
|
assert(mdctx);
|
||||||
pubkeydata = xbps_data_data_nocopy(pubkey);
|
pubkeydata = xbps_data_data_nocopy(pubkey);
|
||||||
bio = BIO_new_mem_buf(__UNCONST(pubkeydata), xbps_data_size(pubkey));
|
bio = BIO_new_mem_buf(pubkeydata, xbps_data_size(pubkey));
|
||||||
assert(bio);
|
assert(bio);
|
||||||
|
|
||||||
pPubKey = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL);
|
pPubKey = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL);
|
||||||
|
@ -52,7 +52,7 @@ rsa_verify_hash(struct xbps_repo *repo, xbps_data_t pubkey,
|
|||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
|
||||||
bio = BIO_new_mem_buf(__UNCONST(xbps_data_data_nocopy(pubkey)),
|
bio = BIO_new_mem_buf(xbps_data_data_nocopy(pubkey),
|
||||||
xbps_data_size(pubkey));
|
xbps_data_size(pubkey));
|
||||||
assert(bio);
|
assert(bio);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user