VirtualBox

Changeset 42049 in vbox


Ignore:
Timestamp:
Jul 9, 2012 12:35:40 PM (13 years ago)
Author:
vboxsync
Message:

VBoxCmp.cpp: duh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/VBoxCmp.cpp

    r42048 r42049  
    7373    for (;;)
    7474    {
    75         uint8_t b1, b2;
    76         if (   fread(&b1, sizeof(b1), 1, pFile1) != 1
    77             || fread(&b2, sizeof(b2), 1, pFile2) != 1)
     75        uint8_t b1;
     76        size_t cb1 = fread(&b1, sizeof(b1), 1, pFile1);
     77        uint8_t b2;
     78        size_t cb2 = fread(&b2, sizeof(b2), 1, pFile2);
     79        if (cb1 != 1 || cb2 != 1)
    7880            break;
    7981        if (b1 != b2)
     
    9496    {
    9597        if (!feof(pFile1) && ferror(pFile1))
    96             printErr("Read error on file #1.\n");
     98            rcRet = printErr("Read error on file #1.\n");
    9799        else if (!feof(pFile2) && ferror(pFile2))
    98             printErr("Read error on file #2.\n");
    99         else if (!feof(pFile1))
    100             printErr("0x%x%08x: file #1 ends before file #2\n", (uint32_t)(off >> 32), (uint32_t)off);
     100            rcRet = printErr("Read error on file #2.\n");
     101        else if (!feof(pFile2))
     102            rcRet = printErr("0x%x%08x: file #1 ends before file #2\n", (uint32_t)(off >> 32), (uint32_t)off);
    101103        else
    102             printErr("0x%x%08x: file #2 ends before file #1\n", (uint32_t)(off >> 32), (uint32_t)off);
     104            rcRet = printErr("0x%x%08x: file #2 ends before file #1\n", (uint32_t)(off >> 32), (uint32_t)off);
    103105    }
    104106
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette