Re: [Linux-ia64] Re: memcpy failure

From: Christian Cotte-Barrot <Christian.Cotte-Barrot_at_bull.net>
Date: 2002-11-16 00:51:36
Matthew Wilcox wrote:
> 
> On Fri, Nov 15, 2002 at 11:32:10AM +0100, Christian Cotte-Barrot wrote:
> > On bad return from memcpy the concerned device driver loggs warning
> > in /var/log/messages and the system administrator may have some doubt
> > about the good working of the device.
> 
> _what_ bad return from memcpy?!  memcpy returns the pointer that was
> passed to it.  What are you going to check for?
> 

Simply, bad return is whatever is not equal to the dest pointer:
  if ((memcpy(rptr, ch->rxptr + tail, dataToRead)) != rptr)
    ...
Received on Fri Nov 15 05:51:59 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST