Re: [patch 3/4] skd: use strncpy() as a cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 13, 2013 at 02:03:23PM +0200, Geert Uytterhoeven wrote:
> On Fri, Sep 13, 2013 at 10:05 AM, Dan Carpenter
> > +       strncpy(inq.driver_version, DRV_VER_COMPL,
> > +               min(sizeof(inq.driver_version), strlen(DRV_VER_COMPL)));
> 
> This does the exact same thing as memcpy(), right? So why not use that?
> memcpy() has much simpler semantics than strncpy().

You're right.  I've redone this.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux