[Libreoffice-commits] .: solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 26 03:44:46 PDT 2012


 solenv/bin/concat-deps.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3d3993969f11400c96ddff3632edd4b60c0cc163
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Oct 26 12:43:55 2012 +0200

    fix incorrect assert() usage
    
    In final (NDEBUG) builds assert expands to (more or less) nothing.
    
    Change-Id: Ie6d43cac381975880c9db2b4a01bd9ed30e2714b

diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 64d2d36..50e9a98 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -798,12 +798,14 @@ static inline void print_fullpaths(char* line)
         else if(*token == ':' || *token == '\\' || *token == '/' ||
                 *token == '$' || ':' == token[1])
         {
-            assert(fwrite(token, token_len, 1, stdout) == 1);
+            if(fwrite(token, token_len, 1, stdout) != 1)
+                abort();
             fputc(' ', stdout);
         }
         else
         {
-            assert(fwrite(token, end - token, 1, stdout) == 1);
+            if(fwrite(token, end - token, 1, stdout) != 1)
+                abort();
             fputc(' ', stdout);
         }
         token = end;


More information about the Libreoffice-commits mailing list