From e8eae16fa13675e66ed1ac1a990aba4f25486508 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 17 Jan 2010 21:16:44 -0600 Subject: [PATCH] Silence warnings about asprintf return value. --- nonlib/Log_Entry.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nonlib/Log_Entry.H b/nonlib/Log_Entry.H index 66fb9d3..ba6e91d 100644 --- a/nonlib/Log_Entry.H +++ b/nonlib/Log_Entry.H @@ -53,7 +53,8 @@ public: void add ( const char *name, type v ) \ { \ grow(); \ - asprintf( &_sa[ _i ], "%s " format, name, (exp) ); \ + if ( -1 == asprintf( &_sa[ _i ], "%s " format, name, (exp) ) ) \ + abort(); \ strtok( _sa[ _i++ ], " " ); \ } \