Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51a505d73bfed863135861fdc0496a09766b69d5
Commit:     51a505d73bfed863135861fdc0496a09766b69d5
Parent:     e47654d016c68a02f654ac16951577804f7789c7
Author:     Milton Miller <[EMAIL PROTECTED]>
AuthorDate: Sat Sep 22 09:03:52 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 11:48:43 2007 +1000

    [POWERPC] boot: Simplify gunzip_finish
    
    Call gunzip_partial to calculate the remaining length and copy the
    data to the user buffer.  This makes it shorter and reduces
    duplication.
    
    Signed-off-by: Milton Miller <[EMAIL PROTECTED]>
    Acked-by: David Gibson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/gunzip_util.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/boot/gunzip_util.c b/arch/powerpc/boot/gunzip_util.c
index e1e215e..ef2aed0 100644
--- a/arch/powerpc/boot/gunzip_util.c
+++ b/arch/powerpc/boot/gunzip_util.c
@@ -194,13 +194,10 @@ int gunzip_finish(struct gunzip_state *state, void *dst, 
int dstlen)
 {
        int len;
 
+       len = gunzip_partial(state, dst, dstlen);
+
        if (state->s.workspace) {
-               len = gunzip_partial(state, dst, dstlen);
                zlib_inflateEnd(&state->s);
-       } else {
-               /* uncompressed image */
-               len = min(state->s.avail_in, (unsigned)dstlen);
-               memcpy(dst, state->s.next_in, len);
        }
 
        return len;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to