summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-10-26 12:43:55 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-26 12:43:55 +0200
commit3d3993969f11400c96ddff3632edd4b60c0cc163 (patch)
tree259dda4e0789f123e47b4027c4f6a8364ea998ba /solenv
parent249a4da9cd5217b0c340edd779bd17e44e21d678 (diff)
fix incorrect assert() usage
In final (NDEBUG) builds assert expands to (more or less) nothing. Change-Id: Ie6d43cac381975880c9db2b4a01bd9ed30e2714b
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/concat-deps.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 64d2d36c5127..50e9a9881f70 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;