diff options
author | Dan McGee <dan@archlinux.org> | 2012-02-13 17:12:39 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-13 17:14:06 +0100 |
commit | c7321a7b80aebeacb05ad5ab9d096779403b1758 (patch) | |
tree | 8fa7f16abc7b7af0c24ba92ababfc5c145d35eed /src/util | |
parent | 115c0381c235100d7b05d9751767017a9ee325c4 (diff) | |
parent | b4f5a63e7fee5d04949e290bd63e5f0e94bd211e (diff) | |
download | pacman-c7321a7b80aebeacb05ad5ab9d096779403b1758.tar.gz pacman-c7321a7b80aebeacb05ad5ab9d096779403b1758.tar.xz |
Merge branch 'maint'
Conflicts:
lib/libalpm/sync.c
src/util/pactree.c
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/pactree.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/pactree.c b/src/util/pactree.c index a7dab9f1..aa02c808 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -168,17 +168,17 @@ static int register_syncs(void) { size_t linelen; char *ptr; + /* ignore whole line and end of line comments */ + if((ptr = strchr(line, '#'))) { + *ptr = '\0'; + } + linelen = strtrim(line); - if(line[0] == '#' || !linelen) { + if(linelen == 0) { continue; } - if((ptr = strchr(line, '#'))) { - *ptr = '\0'; - linelen = strtrim(line); - } - if(line[0] == '[' && line[linelen - 1] == ']') { free(section); section = strndup(&line[1], linelen - 2); |