From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 5BB80DDE29 for ; Wed, 1 Aug 2007 08:55:46 +1000 (EST) In-Reply-To: References: <00a85f152aa3547f0f0b4acd7954468a@kernel.crashing.org> <2055bb54b9816faaf5b2ceedc9cfa039@kernel.crashing.org> <87DC7695-382B-4641-B9D9-75ACB49D41A4@kernel.crashing.org> <719AE7E4-FE6D-4973-8887-F787EC8ABC85@kernel.crashing.org> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <235e0ff22961e25016727c0e74fd0c0f@kernel.crashing.org> From: Segher Boessenkool Subject: Re: [PATCH] powerpc: Add of_register_i2c_devices() Date: Wed, 1 Aug 2007 00:55:37 +0200 To: Guennadi Liakhovetski Cc: linuxppc-dev@ozlabs.org, Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >>> + strncpy(info->driver_name, i2c_devices[i].i2c_driver, >>> KOBJ_NAME_LEN); >>> + strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); >> >> Why not just strcpy(), btw? > > Because target strings are finite length, and sources are just > pointers to > some constant strings, which one might make arbitrarily long. So it's no problem if the name or type string gets cut short? Just checking :-) Segher