diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/bzip2/bzip2recover.c | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/bzip2/bzip2recover.c')
-rw-r--r-- | src/cmd/bzip2/bzip2recover.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cmd/bzip2/bzip2recover.c b/src/cmd/bzip2/bzip2recover.c index ba3d1756..c31c50ab 100644 --- a/src/cmd/bzip2/bzip2recover.c +++ b/src/cmd/bzip2/bzip2recover.c @@ -5,7 +5,7 @@ /*-----------------------------------------------------------*/ /*-- - This program is bzip2recover, a program to attempt data + This program is bzip2recover, a program to attempt data salvage from damaged files created by the accompanying bzip2-1.0 program. @@ -18,16 +18,16 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS @@ -324,10 +324,10 @@ Int32 main ( Int32 argc, Char** argv ) } buffHi = (buffHi << 1) | (buffLo >> 31); buffLo = (buffLo << 1) | (b & 1); - if ( ( (buffHi & 0x0000ffff) == BLOCK_HEADER_HI + if ( ( (buffHi & 0x0000ffff) == BLOCK_HEADER_HI && buffLo == BLOCK_HEADER_LO) - || - ( (buffHi & 0x0000ffff) == BLOCK_ENDMARK_HI + || + ( (buffHi & 0x0000ffff) == BLOCK_ENDMARK_HI && buffLo == BLOCK_ENDMARK_LO) ) { if (bitsRead > 49) @@ -378,7 +378,7 @@ Int32 main ( Int32 argc, Char** argv ) if (b == 2) break; buffHi = (buffHi << 1) | (buffLo >> 31); buffLo = (buffLo << 1) | (b & 1); - if (bitsRead == 47+rbStart[wrBlock]) + if (bitsRead == 47+rbStart[wrBlock]) blockCRC = (buffHi << 16) | (buffLo >> 16); if (outFile != NULL && bitsRead >= rbStart[wrBlock] |