Re: SELinux: Checking source code positions for the setting of error codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux