summaryrefslogtreecommitdiff
path: root/lib/libalpm/.gitignore
diff options
context:
space:
mode:
authorPang Yan Han <pangyanhan@gmail.com>2011-02-05 11:48:54 +0800
committerDan McGee <dan@archlinux.org>2011-02-06 12:50:46 -0600
commit3865352d2390982f45e2b85185dd5b4d89763e93 (patch)
treea982ed25b3f3c3581329390380c8cb5cb3b4e93f /lib/libalpm/.gitignore
parent30bb969ace21b86a8e41de7d30e9d39d86271ed5 (diff)
downloadpacman-3865352d2390982f45e2b85185dd5b4d89763e93.tar.xz
Remove redundant _alpm_strtrim() in be_local.c
When reading the "desc" file in _alpm_local_db_read(), some strings are trimmed and checked for length > 0 before their use/duplication subsequently. They are then trimmed again when there is no need to. The following code snippet should illustrate it clearly: while(fgets(line, sizeof(line), fp) && strlen(_alpm_strtrim(line))) { char *linedup; STRDUP(linedup, _alpm_strtrim(line), goto error); info->groups = alpm_list_add(info->groups, linedup); } This patch removes the redundant _alpm_strtrim() calls in _alpm_local_db_read() such as the one inside the STRDUP shown above. Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/.gitignore')
0 files changed, 0 insertions, 0 deletions