Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-10-11 14:02:20 -0500
committerDan McGee <dan@archlinux.org>2009-10-11 14:41:59 -0500
commit145103aacc57d35579315bfbf7c5607c590af194 (patch)
tree17c0bf08b96f57d11183ce91429774ad8e3cc1d8 /lib
parent35dc9b03149dc2f42022fe5fea80a3aed3207489 (diff)
typing: a few more fixes for special int types
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c2
-rw-r--r--lib/libalpm/alpm.h2
-rw-r--r--lib/libalpm/backup.c8
-rw-r--r--lib/libalpm/dload.c8
-rw-r--r--lib/libalpm/sync.c2
-rw-r--r--lib/libalpm/trans.c4
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index c6751a49..ebcd6a55 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -199,7 +199,7 @@ static int extract_single_file(struct archive *archive,
/* case 12: existing dir, ignore it */
if(lsbuf.st_mode != entrymode) {
/* 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"
"filesystem: %o package: %o\n"), entryname, lsbuf.st_mode & mask,
entrymode & mask);
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index f2cc123c..8033e4d8 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -395,7 +395,7 @@ typedef void (*alpm_trans_cb_conv)(pmtransconv_t, void *, void *,
/* Transaction Progress callback */
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_remove();
int alpm_trans_init(pmtransflag_t flags,
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index e628131f..a0c6b7fc 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -33,7 +33,7 @@
#include "util.h"
/* 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 *ptr;
@@ -65,14 +65,14 @@ int _alpm_backup_split(const char *string, char **file, char **hash)
char *_alpm_backup_file(const char *string)
{
char *file = NULL;
- _alpm_backup_split(string, &file, NULL);
+ backup_split(string, &file, NULL);
return(file);
}
char *_alpm_backup_hash(const char *string)
{
char *hash = NULL;
- _alpm_backup_split(string, NULL, &hash);
+ backup_split(string, NULL, &hash);
return(hash);
}
@@ -95,7 +95,7 @@ char *_alpm_needbackup(const char *file, const alpm_list_t *backup)
char *hash = NULL;
/* no hash found */
- if(!_alpm_backup_split((char *)lp->data, &filename, &hash)) {
+ if(!backup_split((char *)lp->data, &filename, &hash)) {
FREE(filename);
continue;
}
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 8b3226bd..4989d4ac 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -59,7 +59,7 @@ static char *get_filename(const char *url) {
static char *get_destfile(const char *path, const char *filename) {
char *destfile;
/* 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));
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) {
char *tempfile;
/* 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));
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 stat st;
int chk_resume = 0, ret = 0;
- size_t dl_thisfile = 0;
+ off_t dl_thisfile = 0;
ssize_t nread = 0;
char *tempfile, *destfile, *filename;
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) {
const char *server = i->data;
char *fileurl = NULL;
- int len;
+ size_t len;
/* print server + filename into a buffer */
len = strlen(server) + strlen(filename) + 2;
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index a1a6ea7c..a2c88483 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -691,7 +691,7 @@ static int apply_deltas(pmtrans_t *trans)
pmdelta_t *d = dlts->data;
char *delta, *from, *to;
char command[PATH_MAX];
- int len = 0;
+ size_t len = 0;
delta = _alpm_filecache_find(d->delta);
/* the initial package might be in a different cachedir */
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index c99f5964..de45aeae 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -253,7 +253,7 @@ int SYMEXPORT alpm_trans_release()
ASSERT(trans != NULL, 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);
handle->trans = NULL;
@@ -407,7 +407,7 @@ cleanup:
return(retval);
}
-unsigned int SYMEXPORT alpm_trans_get_flags()
+int SYMEXPORT alpm_trans_get_flags()
{
/* Sanity checks */
ASSERT(handle != NULL, return(-1));