[lkml]   [2018]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Cocci] [PATCH 01/18] coccinelle: change strncpy+truncation to strlcpy
> Thanks Himanshu for the suggestions.
> However, I'm not sure to follow the discussion. The original problem was
> that Coccinelle was removing a comment that should be preserved. I think
> that this occurs because the line just below the comment is completely
> removed. Coccinelle considers that the comment belongs with that line and
> if the line is removed the comment won't make much sense.
> In Himanshu's solution, the code is just not transformed at all, so as a
> side effect the comment stays too. Is that what is wanted in this case?

Yes, there is no transformation with my solution which I advised to
prevent comment removal(which i thought was useful).

My rule is more narrower approach than the regular ones which used
"expression" metavariable.

Rest upto Dominique to choose whatever suits better :)

Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
 \ /
  Last update: 2018-07-15 22:06    [W:0.130 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site