On Tue, Feb 18, 2020 at 01:25:00PM -0800, Jacob Keller wrote: > > I still think it would be good to have the functions guarantee the NULL > by manually assigning or using one of the string copy implementations > that will guarantee it. That way they don't have to rely on this assumption.
In the final version, we have, char name[MAX_IFNAME_SIZE + 1]; char ts_label[MAX_IFNAME_SIZE + 1]; strncpy(iface->name, name, MAX_IFNAME_SIZE); memcpy(iface->ts_label, iface->name, MAX_IFNAME_SIZE); strncpy(iface->ts_label, label, MAX_IFNAME_SIZE); so I think it is clear enough. The use of MAX_IFNAME_SIZE is key. Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptpfirstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/linuxptp-devel