readlink.2 query

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

 



Hello
Just looking at readlink.2 I have a query

http://man7.org/linux/man-pages/man2/readlink.2.html

r = readlink(argv[1], linkname, sb.st_size + 1);

Would this example be better without +1 ? We need to save that byte
for nul terminator.

Nicer to add: free(linkname);

Also, re ENOMEM is this really kernel memory error?

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




[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