Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-28 17:32:11 -0400
committerDan McGee <dan@archlinux.org>2012-06-25 23:04:31 -0500
commitf556fe8b4a199116b5665bb5f0886e4c2962b077 (patch)
treeda359a1cea95066f32962219e4909adf325c0df4 /lib/libalpm/be_package.c
parent74274b5dc347ba70e4abd1f329feb41538f82ff4 (diff)
add line length parameter to _alpm_strip_newline
If known, callers can pass the line size to this function in order to avoid an strlen call. Otherwise, they simply pass 0 and _alpm_strip_newline will do the call instead. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 0d296a81..dd027f5e 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -168,7 +168,7 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
/* loop until we reach EOF or other error */
while((ret = _alpm_archive_fgets(a, &buf)) == ARCHIVE_OK) {
- size_t len = _alpm_strip_newline(buf.line);
+ size_t len = _alpm_strip_newline(buf.line, buf.real_line_size);
linenum++;
key = buf.line;