From: Uwe Hermann Date: Tue, 16 Oct 2012 12:48:39 +0000 (+0200) Subject: HACKING: Cosmetics. X-Git-Tag: dsupstream~663 X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=8ed262509f6f5e5a3b9a45ae6d116b1c36c750d7 HACKING: Cosmetics. --- diff --git a/HACKING b/HACKING index 092be40e..cd7e2655 100644 --- a/HACKING +++ b/HACKING @@ -37,10 +37,10 @@ Random notes - Never use g_malloc() or g_malloc0(). These functions do not return NULL if not enough memory is available but rather lead to an exit() or segfault - instead. This behaviour is not acceptable for libsigrok. + instead. This behaviour is not acceptable for libraries. Use g_try_malloc()/g_try_malloc0() instead and check the return value. - - libsigrok should never print any messages (neither to stdout nor stderr nor + - You should never print any messages (neither to stdout nor stderr nor elsewhere) "manually" via e.g. printf() or g_log() or similar functions. Only sr_err()/sr_warn()/sr_info()/sr_dbg()/sr_spew() should be used.