Free the buffer before return. Also check the malloc return value.
Perhaps it's not a good idea to exit() on error, but it's in line with the
rest of the function.
Strange thing with this function is that the allocated buffer doesn't seem
to be used for anything. The data read into it doesn't go
Looks OK to me.
Any objections?
--
Øyvind Harboe
Can Zylin Consulting help on your project?
US toll free 1-866-980-3434 / International +47 51 87 40 27
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
__
Free the buffer before return. Also check the malloc return value.
Perhaps it's not a good idea to exit() on error, but it's in line with the
rest of the function.
Strange thing with this function is that the allocated buffer doesn't seem
to be used for anything. The data read into it doesn't g
Andreas Fritiofson wrote:
> Strange thing with this function is that the allocated buffer doesn't seem
> to be used for anything. The data read into it doesn't go anywhere. Maybe
> the entire function is flawed, or is the data really supposed to be
> discarded?
If noone can answer this then I woul
On Thu, Jun 9, 2011 at 8:37 AM, Peter Stuge wrote:
> Andreas Fritiofson wrote:
>> Strange thing with this function is that the allocated buffer doesn't seem
>> to be used for anything. The data read into it doesn't go anywhere. Maybe
>> the entire function is flawed, or is the data really supposed
> Definitely! I'm holding off on this patch in favor of a patch that deletes
> cruft instead of decorating it :-)
I have a soft spot for patches that delete code that nobody
understands
--
Øyvind Harboe
Can Zylin Consulting help on your project?
US toll free 1-866-980-3434 / International
On Thu, Jun 9, 2011 at 8:40 AM, Øyvind Harboe wrote:
> > Definitely! I'm holding off on this patch in favor of a patch that
> deletes
> > cruft instead of decorating it :-)
>
> I have a soft spot for patches that delete code that nobody
> understands
>
>
IF the function is actually used, the a