[PATCH] powerpc: Add of_register_i2c_devices()

Scott Wood scottwood at freescale.com
Thu Aug 2 06:42:24 EST 2007


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



More information about the Linuxppc-dev mailing list