[FOSS_TLK] lib: debug: display buffer overflow prints for release builds
Varun Wadekar [Wed, 12 Nov 2014 09:51:28 +0000 (14:51 +0530)]
The buffer overflow prints are a debugging mechanism and hence can
be disabled for RELEASE builds.

Change-Id: If91042a581712a24821ae821ccf1675352f73c73
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/707293
Reviewed-by: Automatic_Commit_Validation_User

lib/debug/debug.c

index ddc0983..885e1bf 100644 (file)
@@ -121,8 +121,10 @@ static int _dprintf_output_func(char c, void *state)
                *(char *)(early_logbuf + early_char_count + 1) = '\0';
                early_char_count++;
                if (early_char_count > (EARLYBUF_SIZE - 2)) {
+#if DEBUGLEVEL > INFO
                        _dputs("\nTLK early buffer overflow, \
                                overwriting data!\n");
+#endif
                        early_char_count = 0;
                }
        } else {