lkml.org 
[lkml]   [2017]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] alpha: Move two assignments for the variable "res" in srm_env_proc_write()
On Wed, Jan 18, 2017 at 12:50:17PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 18 Jan 2017 12:08:44 +0100
>
> A local variable was set to an error code in two cases before a concrete
> error situation was detected. Thus move the corresponding assignment into
> an if branch to indicate a software failure there.
>
> This issue was detected by using the Coccinelle software.

Why the hell is that an issue? It's a common enough idiom, and while these
functions are far from being hot paths, blind patches like that are very
much to be discouraged. NAK.

\
 
 \ /
  Last update: 2017-01-18 15:12    [W:0.317 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site