index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Jason St. John <jstjohn@purdue.edu> | 2013-07-22 03:09:57 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-07-30 13:00:20 +1000 |
commit | 4ad6939980a9c6e6fc12c78d9d4b0d2a69dcc01b (patch) | |
tree | 5bce218b117bfa733504ddf6e0c1e516ad907b4b /src/util/pactree.c | |
parent | 0f22bef8c3441fce4cc47618f644e4f818117014 (diff) |
-rw-r--r-- | src/util/pactree.c | 20 |
diff --git a/src/util/pactree.c b/src/util/pactree.c index 4ca41a05..42c75aaf 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -125,21 +125,21 @@ const char *configfile = CONFFILE; /* A quick and dirty implementation derived from glibc */ static size_t strnlen(const char *s, size_t max) { - register const char *p; - for(p = s; *p && max--; ++p); - return (p - s); + register const char *p; + for(p = s; *p && max--; ++p); + return (p - s); } char *strndup(const char *s, size_t n) { - size_t len = strnlen(s, n); - char *new = (char *) malloc(len + 1); + size_t len = strnlen(s, n); + char *new = (char *) malloc(len + 1); - if(new == NULL) - return NULL; + if(new == NULL) + return NULL; - new[len] = '\0'; - return (char *)memcpy(new, s, len); + new[len] = '\0'; + return (char *)memcpy(new, s, len); } #endif @@ -362,7 +362,7 @@ static void print_text(const char *pkg, const char *provision, /* print tip */ if(!pkg && provision) { - printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1, + printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1, provision, color->branch1, color->off); } else if(provision && strcmp(pkg, provision) != 0) { printf("%s%s%s%s%s %s%s%s\n", tip, color->leaf1, pkg, |