From: Joerg H. <jo...@de...> - 2004-05-16 14:17:51
|
Hi I've just doing some review especially on error handling when doing malloc and realloc. I think it's not good to declare lot of functions as "void" and in case of an error just do a "return;" in that case you canot detect errors and behave respectivly. I prefer a to replace at least some void-functions with (signed) int with a standard return value of 1; if an error happens, they will return something != 1 (normally < 1). This will probably produce at lot more if(function()) constructs, but I think it's worth. What do you think about that? Joerg -- Fachbegriffe der Informatik (Nr 78): Kinderpornographie im Internet - Schwarzer Peter für den nächsten Wahlkampf Florian Kuehnert |