Guennadi Liakhovetski wrote:
> And the only safe way is 
> 
>       strncpy(z.c, c, 3);
>       z.c[3] = '\0';
> 
> with compilers < 4.2?...

You could use strlcpy() instead, which always leaves a zero terminator.

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to