This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMIT PATCH 1/2] savestring: Rename parameter 'size' to 'len'.


> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 14 Feb 2013 17:14:04 +0000
> 
> It's better to avoid needless confusion, and call a string's length,
> length, instead of size, which is usually used to refer to sizeof of
> the string (len+1):
> 
> 	size_t len = strlen (str);
> 	size_t size = sizeof (str);
> 
> Tested on x86_64 Fedora 17.

Agreed

> 2013-02-14  Pedro Alves  <palves@redhat.com>
> 
> 	* utils.c (savestring): Rename parameter 'size' to 'len'.
> ---
>  gdb/utils.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]