lkml.org 
[lkml]   [2017]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: SELinux: Checking source code positions for the setting of error codes
From
Date
> I have a personal style preference for
>
> rc = -ENOMEM;
> val = kalloc();
> if (!val)
> goto err;
>
> vs
>
> val = kalloc();
> if (!val) {
> rc = -ENOMEM;
> goto err;
> }
>
> because it saves 1 line

Thanks for your feedback.


> and I think the compiler does the right/same thing.

* Did you check any corresponding code generation results in more detail?

* Can misplaced variable assignments result in unwanted run time consequences
because of the previous approach for a control flow specification?

* How do you think about to achieve that error codes will only be set
after a specific software failure was detected?

Regards,
Markus

\
 
 \ /
  Last update: 2017-01-16 19:32    [W:0.511 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site