diff options
author | Dan McGee <dan@archlinux.org> | 2009-10-11 13:51:47 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-10-11 13:51:47 -0500 |
commit | 35dc9b03149dc2f42022fe5fea80a3aed3207489 (patch) | |
tree | dbcfa549cf1b8bf30e4d94bad301e6f1f9c12179 /lib/libalpm/alpm.h | |
parent | cf0d619670a4d0c67ad67e22bacbb69c203714f5 (diff) | |
download | pacman-35dc9b03149dc2f42022fe5fea80a3aed3207489.tar.xz |
int typing: s/unsigned short/int/ in libalpm
After our recent screwup with size_t and ssize_t in the download code, I
found the `-Wsign-conversion` flag to GCC to see if we were doing anything
else boneheaded. I didn't find anything quite as bad, but we did have some
goofups- most of our public unsigned methods would return -1 on error, which
is a bit odd in an unsigned context.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r-- | lib/libalpm/alpm.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index e9fadca2..f2cc123c 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -128,8 +128,8 @@ int alpm_option_set_logfile(const char *logfile); const char *alpm_option_get_lockfile(); /* no set_lockfile, path is determined from dbpath */ -unsigned short alpm_option_get_usesyslog(); -void alpm_option_set_usesyslog(unsigned short usesyslog); +int alpm_option_get_usesyslog(); +void alpm_option_set_usesyslog(int usesyslog); alpm_list_t *alpm_option_get_noupgrades(); void alpm_option_add_noupgrade(const char *pkg); @@ -154,7 +154,7 @@ int alpm_option_remove_ignoregrp(const char *grp); const char *alpm_option_get_arch(); void alpm_option_set_arch(const char *arch); -void alpm_option_set_usedelta(unsigned short usedelta); +void alpm_option_set_usedelta(int usedelta); pmdb_t *alpm_option_get_localdb(); alpm_list_t *alpm_option_get_syncdbs(); @@ -195,7 +195,7 @@ typedef enum _pmpkgreason_t { PM_PKG_REASON_DEPEND = 1 /* installed as a dependency for another package */ } pmpkgreason_t; -int alpm_pkg_load(const char *filename, unsigned short full, pmpkg_t **pkg); +int alpm_pkg_load(const char *filename, int full, pmpkg_t **pkg); int alpm_pkg_free(pmpkg_t *pkg); int alpm_pkg_checkmd5sum(pmpkg_t *pkg); char *alpm_fetch_pkgurl(const char *url); @@ -231,8 +231,8 @@ size_t alpm_pkg_changelog_read(void *ptr, size_t size, const pmpkg_t *pkg, const void *fp); /*int alpm_pkg_changelog_feof(const pmpkg_t *pkg, void *fp);*/ int alpm_pkg_changelog_close(const pmpkg_t *pkg, void *fp); -unsigned short alpm_pkg_has_scriptlet(pmpkg_t *pkg); -unsigned short alpm_pkg_has_force(pmpkg_t *pkg); +int alpm_pkg_has_scriptlet(pmpkg_t *pkg); +int alpm_pkg_has_force(pmpkg_t *pkg); off_t alpm_pkg_download_size(pmpkg_t *newpkg); |