[Offtopic] Are these good coding rules for C?

Gargi Sharma gs051095 at gmail.com
Sat Apr 22 11:00:03 EDT 2017


Read this somewhere and thought it really made sense( quoting verbatim):

Obligatory reminder that "Safety Critical Program" is the operative
term here. Every time this kind of thing gets passed around, people
try to apply the rules to general purpose software, but you really,
truly don't need to be this strict (and probably shouldn't, since most
of these rules create complications for readability and
maintainability) unless an unhandled exception in your software will
literally kill people.

gargi


On Sat, Apr 22, 2017 at 4:17 PM, Anuz Pratap Singh Tomar
<chambilkethakur at gmail.com> wrote:
> Hi,
> I came across this paper http://spinroot.com/gerard/pdf/P10.pdf written by
> someone at JPL, NASA.
> Some of the rules stated in this paper are good rules about bound checking
> and keeping functions short makes sense, whereas some others about malloc
> and pointers seems less of rules, but believing that programs are unable to
> handle these tasks properly.
> I am not sure if Linux in areas which are safety critical and if so does
> that code follow similar rules?
>
> --
> Thank you
> Warm Regards
> Anuz
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



More information about the Kernelnewbies mailing list