Re: [libvirt] [PATCH] Prohibit verbose strcat

2016-02-11 Thread Andrea Bolognani
On Thu, 2016-02-11 at 07:43 +0100, Ján Tomko wrote: > > > + halt='Use strcat(a, b) instead of strncat(a, b, strlen())' \ > > > > s/strlen()/strlen(b)/ > > That would make it match itself, so I limited the check to C files > in_vc_files='\.[ch]$$' Which is a good idea anyway, I guess :) Cheers.

Re: [libvirt] [PATCH] Prohibit verbose strcat

2016-02-10 Thread Ján Tomko
On Wed, Feb 10, 2016 at 06:47:00PM +0100, Andrea Bolognani wrote: > On Wed, 2016-02-10 at 17:26 +0100, Ján Tomko wrote: > > Using strcat directly is more readable than passing strlen > > of the copied string to strncat. > > --- > >  cfg.mk| 5 + > >  src/storage/s

Re: [libvirt] [PATCH] Prohibit verbose strcat

2016-02-10 Thread Andrea Bolognani
On Wed, 2016-02-10 at 17:26 +0100, Ján Tomko wrote: > Using strcat directly is more readable than passing strlen > of the copied string to strncat. > --- >  cfg.mk| 5 + >  src/storage/storage_backend_logical.c | 4 ++-- >  2 files changed, 7 insertions(+), 2 delet

[libvirt] [PATCH] Prohibit verbose strcat

2016-02-10 Thread Ján Tomko
Using strcat directly is more readable than passing strlen of the copied string to strncat. --- cfg.mk| 5 + src/storage/storage_backend_logical.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cfg.mk b/cfg.mk index 71b0866..be9e475 100