pacman/callback: reuse strlen calculation
commit11ab9aa9f5f0f3873df89c73e8715b82f485bd9b
authorDave Reisner <dreisner@archlinux.org>
Tue, 30 Aug 2011 13:24:28 +0000 (30 09:24 -0400)
committerDan McGee <dan@archlinux.org>
Thu, 1 Sep 2011 16:33:28 +0000 (1 11:33 -0500)
tree905d304d3d75e72ab91a7fd3c4bc71fe4e346401
parentcf1f0143935fe62ebb568202ff83ba2de0815995
pacman/callback: reuse strlen calculation

Call strlen earlier in the dl progress callback, and reuse this length
to replace some heavier str*() calls with more optimized mem*()
replacements. This also gets rid of a false assumption that the ending
string will ever be longer than the original string.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
src/pacman/callback.c