Re: [PATCH] printk.c: removed unnecessary code

2016-11-30 Thread Petr Mladek
On Wed 2016-11-30 10:14:28, Michal Hocko wrote: > [Resending with the full CC list as my email client has clobbered it in > the previous attempt for some reason] > > On Tue 29-11-16 16:19:01, Sebastian Duda wrote: > > snprintf((char *) ?, 0, ...); always returns Zero and doesn't change the > >

Re: [PATCH] printk.c: removed unnecessary code

2016-11-30 Thread Petr Mladek
On Wed 2016-11-30 10:14:28, Michal Hocko wrote: > [Resending with the full CC list as my email client has clobbered it in > the previous attempt for some reason] > > On Tue 29-11-16 16:19:01, Sebastian Duda wrote: > > snprintf((char *) ?, 0, ...); always returns Zero and doesn't change the > >

Re: [PATCH] printk.c: removed unnecessary code

2016-11-30 Thread Michal Hocko
[Resending with the full CC list as my email client has clobbered it in the previous attempt for some reason] On Tue 29-11-16 16:19:01, Sebastian Duda wrote: > snprintf((char *) ?, 0, ...); always returns Zero and doesn't change the data. > Thus the execution of > snprintf(NULL, 0,

Re: [PATCH] printk.c: removed unnecessary code

2016-11-30 Thread Michal Hocko
[Resending with the full CC list as my email client has clobbered it in the previous attempt for some reason] On Tue 29-11-16 16:19:01, Sebastian Duda wrote: > snprintf((char *) ?, 0, ...); always returns Zero and doesn't change the data. > Thus the execution of > snprintf(NULL, 0,

[PATCH] printk.c: removed unnecessary code

2016-11-29 Thread Sebastian Duda
snprintf((char *) ?, 0, ...); always returns Zero and doesn't change the data. Thus the execution of snprintf(NULL, 0, "[%5lu.00] ", (unsigned long)ts); has no effect on program. The substitution with 0 increases the readability of the code. Signed-off-by: Sebastian Duda

[PATCH] printk.c: removed unnecessary code

2016-11-29 Thread Sebastian Duda
snprintf((char *) ?, 0, ...); always returns Zero and doesn't change the data. Thus the execution of snprintf(NULL, 0, "[%5lu.00] ", (unsigned long)ts); has no effect on program. The substitution with 0 increases the readability of the code. Signed-off-by: Sebastian Duda