summaryrefslogtreecommitdiffstats
path: root/src/pacman/callback.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-28 16:44:15 +0200
committerDan McGee <dan@archlinux.org>2011-09-28 16:48:08 +0200
commit1b8bb7c1cd81c1f8f0dcffc952cd464b6a436f06 (patch)
treeef549a816aa644ef8ac2ba2201813daee67803d4 /src/pacman/callback.c
parentf682cbd43355daa7b13389d74e0ffea0370ba89b (diff)
downloadpacman-1b8bb7c1cd81c1f8f0dcffc952cd464b6a436f06.tar.gz
pacman-1b8bb7c1cd81c1f8f0dcffc952cd464b6a436f06.tar.xz
Use unsigned types for indent width and column count
For getcols(), the functions we call return a value of type 'unsigned short', so it makes sense for us to do the same. string_length() is meant to behave like strlen(), so it should return type size_t. This exposes other functions such as indentprint() which should also be using signed return types. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r--src/pacman/callback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 9d4663a0..3ba07b0c 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -375,7 +375,7 @@ void cb_progress(alpm_progress_t event, const char *pkgname, int percent,
int len, wclen, wcwid, padwid;
wchar_t *wcstr;
- const int cols = getcols();
+ const unsigned short cols = getcols();
if(config->noprogressbar || cols == 0) {
return;
@@ -534,7 +534,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
const char *rate_label, *xfered_label;
int file_percent = 0, total_percent = 0;
- const int cols = getcols();
+ const unsigned short cols = getcols();
if(config->noprogressbar || cols == 0 || file_total == -1) {
if(file_xfered == 0) {