summaryrefslogtreecommitdiff
path: root/src/pacman/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 406145e3..e88001ac 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -210,7 +210,7 @@ char *strtrim(char *str)
{
char *pch = str;
- if(*str == '\0') {
+ if(str == NULL || *str == '\0') {
/* string is empty, so we're done. */
return(str);
}
@@ -350,7 +350,7 @@ void display_targets(alpm_list_t *syncpkgs)
isize += alpm_pkg_get_isize(pkg);
/* print the package size with the output if ShowSize option set */
- if(alpm_option_get_showsize()) {
+ if(config->showsize) {
/* Convert byte size to MB */
mbdispsize = dispsize / (1024.0 * 1024.0);