Re: [PATCH] GetUrlCacheEntryInfo*: Handle null dest pointer when length is given

2008-06-07 Thread Jon Griffiths
> Internal functions should return an error code instead of > calling SetLastError. Perhaps in a general sense, but URLCache_CopyEntry already did SetLastError(ERROR_INSUFFICIENT_BUFFER): setting it there means the 4 places that call it don't need to ^ the logic to set the 2 different errors thems

Re: [PATCH] GetUrlCacheEntryInfo*: Handle null dest pointer when length is given

2008-06-06 Thread Jon Griffiths
> Internal functions should return an error code instead of > calling SetLastError. Perhaps in a general sense, but URLCache_CopyEntry already did SetLastError(ERROR_INSUFFICIENT_BUFFER): setting it there means the 4 places that call it don't need to the logic to set the 2 different errors thems

Re: [PATCH] GetUrlCacheEntryInfo*: Handle null dest pointer when length is given

2008-06-06 Thread Rob Shearman
2008/6/6 Jon Griffiths <[EMAIL PROTECTED]>: > -if (dwRequiredSize > *lpdwBufferSize) > -{ > -*lpdwBufferSize = dwRequiredSize; > +ret = dwRequiredSize > *lpdwBufferSize? FALSE : TRUE; > +*lpdwBufferSize = dwRequiredSize; > + > +if (!ret) > SetLastError(ERROR_INS