lkml.org 
[lkml]   [2012]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: android: binder.c const char* smth TO const char * const smth
On Mon, Apr 16, 2012 at 05:31:34AM +0300, Valentin Ilie wrote:
> Replaced static const char* var with static const char * var const smth because
> smth doesn't need to be reassigned at any point else at runtime.

"smth"? What is that?

>
> Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
> ---
> drivers/staging/android/binder.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> index c283212..221bd3f 100644
> --- a/drivers/staging/android/binder.c
> +++ b/drivers/staging/android/binder.c
> @@ -3303,7 +3303,7 @@ static void print_binder_proc(struct seq_file *m,
> m->count = start_pos;
> }
>
> -static const char *binder_return_strings[] = {
> +static const char * const binder_return_strings[] = {

I don't understand, what's the advantage here? Why is this needed?
Does it save space? Speed? Compiler warnings?

I need a better reason to apply it other than a word with no vowels...

greg k-h


\
 
 \ /
  Last update: 2012-04-19 01:51    [W:0.099 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site