[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] Revision 3817: fwrite/fread usage

From: Norbert Unterberg <nunterberg_at_gmail.com>
Date: 2005-07-01 23:26:34 CEST

Steve,

Just a small note on changeset 3817:
The C runtime functions fread and fwrite do not return a boolean for
success, they return the *number of items* read or written.

if (!fread(m_sOwner.GetBuffer(value), sizeof(char), value, pFile))
{
   // error
}

should be something like

if (fread(m_sOwner.GetBuffer(value), sizeof(char), value, pFile) != value)
{
   // error
}

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Jul 1 23:51:50 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.