typing: a few more fixes for special int types
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
35dc9b0314
commit
145103aacc
6 changed files with 13 additions and 13 deletions
|
@ -199,7 +199,7 @@ static int extract_single_file(struct archive *archive,
|
||||||
/* case 12: existing dir, ignore it */
|
/* case 12: existing dir, ignore it */
|
||||||
if(lsbuf.st_mode != entrymode) {
|
if(lsbuf.st_mode != entrymode) {
|
||||||
/* if filesystem perms are different than pkg perms, warn user */
|
/* if filesystem perms are different than pkg perms, warn user */
|
||||||
int mask = 07777;
|
mode_t mask = 07777;
|
||||||
_alpm_log(PM_LOG_WARNING, _("directory permissions differ on %s\n"
|
_alpm_log(PM_LOG_WARNING, _("directory permissions differ on %s\n"
|
||||||
"filesystem: %o package: %o\n"), entryname, lsbuf.st_mode & mask,
|
"filesystem: %o package: %o\n"), entryname, lsbuf.st_mode & mask,
|
||||||
entrymode & mask);
|
entrymode & mask);
|
||||||
|
|
|
@ -395,7 +395,7 @@ typedef void (*alpm_trans_cb_conv)(pmtransconv_t, void *, void *,
|
||||||
/* Transaction Progress callback */
|
/* Transaction Progress callback */
|
||||||
typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, int, int);
|
typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, int, int);
|
||||||
|
|
||||||
unsigned int alpm_trans_get_flags();
|
int alpm_trans_get_flags();
|
||||||
alpm_list_t * alpm_trans_get_add();
|
alpm_list_t * alpm_trans_get_add();
|
||||||
alpm_list_t * alpm_trans_get_remove();
|
alpm_list_t * alpm_trans_get_remove();
|
||||||
int alpm_trans_init(pmtransflag_t flags,
|
int alpm_trans_init(pmtransflag_t flags,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
/* split a backup string "file\thash" into two strings : file and hash */
|
/* split a backup string "file\thash" into two strings : file and hash */
|
||||||
int _alpm_backup_split(const char *string, char **file, char **hash)
|
static int backup_split(const char *string, char **file, char **hash)
|
||||||
{
|
{
|
||||||
char *str = strdup(string);
|
char *str = strdup(string);
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
@ -65,14 +65,14 @@ int _alpm_backup_split(const char *string, char **file, char **hash)
|
||||||
char *_alpm_backup_file(const char *string)
|
char *_alpm_backup_file(const char *string)
|
||||||
{
|
{
|
||||||
char *file = NULL;
|
char *file = NULL;
|
||||||
_alpm_backup_split(string, &file, NULL);
|
backup_split(string, &file, NULL);
|
||||||
return(file);
|
return(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *_alpm_backup_hash(const char *string)
|
char *_alpm_backup_hash(const char *string)
|
||||||
{
|
{
|
||||||
char *hash = NULL;
|
char *hash = NULL;
|
||||||
_alpm_backup_split(string, NULL, &hash);
|
backup_split(string, NULL, &hash);
|
||||||
return(hash);
|
return(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ char *_alpm_needbackup(const char *file, const alpm_list_t *backup)
|
||||||
char *hash = NULL;
|
char *hash = NULL;
|
||||||
|
|
||||||
/* no hash found */
|
/* no hash found */
|
||||||
if(!_alpm_backup_split((char *)lp->data, &filename, &hash)) {
|
if(!backup_split((char *)lp->data, &filename, &hash)) {
|
||||||
FREE(filename);
|
FREE(filename);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ static char *get_filename(const char *url) {
|
||||||
static char *get_destfile(const char *path, const char *filename) {
|
static char *get_destfile(const char *path, const char *filename) {
|
||||||
char *destfile;
|
char *destfile;
|
||||||
/* len = localpath len + filename len + null */
|
/* len = localpath len + filename len + null */
|
||||||
int len = strlen(path) + strlen(filename) + 1;
|
size_t len = strlen(path) + strlen(filename) + 1;
|
||||||
CALLOC(destfile, len, sizeof(char), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(destfile, len, sizeof(char), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
snprintf(destfile, len, "%s%s", path, filename);
|
snprintf(destfile, len, "%s%s", path, filename);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ static char *get_destfile(const char *path, const char *filename) {
|
||||||
static char *get_tempfile(const char *path, const char *filename) {
|
static char *get_tempfile(const char *path, const char *filename) {
|
||||||
char *tempfile;
|
char *tempfile;
|
||||||
/* len = localpath len + filename len + '.part' len + null */
|
/* len = localpath len + filename len + '.part' len + null */
|
||||||
int len = strlen(path) + strlen(filename) + 6;
|
size_t len = strlen(path) + strlen(filename) + 6;
|
||||||
CALLOC(tempfile, len, sizeof(char), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(tempfile, len, sizeof(char), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
snprintf(tempfile, len, "%s%s.part", path, filename);
|
snprintf(tempfile, len, "%s%s.part", path, filename);
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ static int download_internal(const char *url, const char *localpath,
|
||||||
struct url_stat ust;
|
struct url_stat ust;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int chk_resume = 0, ret = 0;
|
int chk_resume = 0, ret = 0;
|
||||||
size_t dl_thisfile = 0;
|
off_t dl_thisfile = 0;
|
||||||
ssize_t nread = 0;
|
ssize_t nread = 0;
|
||||||
char *tempfile, *destfile, *filename;
|
char *tempfile, *destfile, *filename;
|
||||||
struct sigaction new_action, old_action;
|
struct sigaction new_action, old_action;
|
||||||
|
@ -300,7 +300,7 @@ int _alpm_download_single_file(const char *filename,
|
||||||
for(i = servers; i; i = i->next) {
|
for(i = servers; i; i = i->next) {
|
||||||
const char *server = i->data;
|
const char *server = i->data;
|
||||||
char *fileurl = NULL;
|
char *fileurl = NULL;
|
||||||
int len;
|
size_t len;
|
||||||
|
|
||||||
/* print server + filename into a buffer */
|
/* print server + filename into a buffer */
|
||||||
len = strlen(server) + strlen(filename) + 2;
|
len = strlen(server) + strlen(filename) + 2;
|
||||||
|
|
|
@ -691,7 +691,7 @@ static int apply_deltas(pmtrans_t *trans)
|
||||||
pmdelta_t *d = dlts->data;
|
pmdelta_t *d = dlts->data;
|
||||||
char *delta, *from, *to;
|
char *delta, *from, *to;
|
||||||
char command[PATH_MAX];
|
char command[PATH_MAX];
|
||||||
int len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
delta = _alpm_filecache_find(d->delta);
|
delta = _alpm_filecache_find(d->delta);
|
||||||
/* the initial package might be in a different cachedir */
|
/* the initial package might be in a different cachedir */
|
||||||
|
|
|
@ -253,7 +253,7 @@ int SYMEXPORT alpm_trans_release()
|
||||||
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
||||||
ASSERT(trans->state != STATE_IDLE, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
ASSERT(trans->state != STATE_IDLE, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
||||||
|
|
||||||
unsigned int nolock_flag = trans->flags & PM_TRANS_FLAG_NOLOCK;
|
int nolock_flag = trans->flags & PM_TRANS_FLAG_NOLOCK;
|
||||||
|
|
||||||
_alpm_trans_free(trans);
|
_alpm_trans_free(trans);
|
||||||
handle->trans = NULL;
|
handle->trans = NULL;
|
||||||
|
@ -407,7 +407,7 @@ cleanup:
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int SYMEXPORT alpm_trans_get_flags()
|
int SYMEXPORT alpm_trans_get_flags()
|
||||||
{
|
{
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
ASSERT(handle != NULL, return(-1));
|
ASSERT(handle != NULL, return(-1));
|
||||||
|
|
Loading…
Add table
Reference in a new issue