do_compress(): Fix return value in error path
authorEric Biggers <ebiggers3@gmail.com>
Wed, 25 Dec 2013 17:57:32 +0000 (11:57 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 25 Dec 2013 17:57:32 +0000 (11:57 -0600)
src/compat.c

index 2de1c35..4000724 100644 (file)
@@ -43,7 +43,7 @@ do_compress(const void *udata, unsigned ulen, void *cdata, int ctype)
        unsigned clen;
 
        if (wimlib_create_compressor(ctype, 32768, NULL, &c))
-               return -1;
+               return 0;
        clen = wimlib_compress(udata, ulen, cdata, ulen - 1, c);
        wimlib_free_compressor(c);
        return clen;