27 Aug
2012
27 Aug
'12
7:24 a.m.
On 12/08/12 07:35, Andrew Gregory wrote:
Also consolidates cleanup for query_fileowner.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> --- src/pacman/query.c | 28 ++++++++++++++-------------- src/pacman/util.c | 5 ++++- 2 files changed, 18 insertions(+), 15 deletions(-)
<snip>
diff --git a/src/pacman/util.c b/src/pacman/util.c index 2d1b762..ba7a8c0 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -239,7 +239,10 @@ char *mdirname(const char *path) return strdup("."); }
- ret = strdup(path); + if((ret = strdup(path)) == NULL) { + return NULL;
Whitespace error. Fixed on my working branch.
+ } + last = strrchr(ret, '/');
if(last != NULL) {