]> granicus.if.org Git - php/commitdiff
MFH: Fixed compiler warning.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 9 Jun 2005 16:13:24 +0000 (16:13 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 9 Jun 2005 16:13:24 +0000 (16:13 +0000)
ext/bz2/bz2.c

index b4b259c609a0a29bf615fb77a012b8d11282014d..5d744d3033cd47f6f4600aad98b64975f7526402 100644 (file)
@@ -462,13 +462,13 @@ PHP_FUNCTION(bzdecompress)
        while ((error = BZ2_bzDecompress(&bzs)) == BZ_OK && bzs.avail_in > 0) {
                /* compression is better then 2:1, need to allocate more memory */
                bzs.avail_out = source_len;
-               size = (bzs.total_out_hi32 << 32) + bzs.total_out_lo32;
+               size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;
                dest = erealloc(dest, size + bzs.avail_out + 1);
                bzs.next_out = dest + size;
        }
 
        if (error == BZ_STREAM_END || error == BZ_OK) {
-               size = (bzs.total_out_hi32 << 32) + bzs.total_out_lo32;
+               size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;
                dest = erealloc(dest, size + 1);
                dest[size] = '\0';
                RETVAL_STRINGL(dest, size, 0);