Re: [PATCH v3 0/1] Rewritten page for string-copying functions

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

 





On 12/14/22 01:14, Alejandro Colomar wrote:

               An implementation of this function might be:

                   char *
                   stpcpy(char *restrict dst, const char *restrict src)
                   {
                       return mempcpy(dst, src, strlen(src));

Oops.  It should have been:

char *p;

p = mempcpy(dst, src, strlen(src));
p = '\0';

*p = '\0';  //:)
return p;

                   }


--
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux