From 75727a0f63c452ded09d7a35b8143e49d341df4e Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Wed, 13 Apr 2016 09:34:36 +0200
Subject: [PATCH] another ignore return value fix

---
 alib2measurepp/src/provisioner/MeasurementProvisioner.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp b/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp
index 3c69b543b0..bba4b2b98f 100644
--- a/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp
+++ b/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp
@@ -235,7 +235,6 @@ void MeasurementProvisioner::PipelineRunnerEnvironment::commandFdSwap ( ) {
 	if ( ( dup ( outputTmpfile.fd ) == -1 ) || ( dup ( inputTmpfile.fd ) == -1 ) )
 		throw::exception::CommonException ( "MeasurementProvisioner: dup failed" );
 
-
 	 // rewind previous stdout to the beginning, so the next command can read the whole file as input
 	lseek ( 0, 0, SEEK_SET );
 
@@ -264,7 +263,10 @@ string MeasurementProvisioner::PipelineRunnerEnvironment::retrievePipelineError
 
 	 // destroy stderr contents
 	lseek ( 2, 0, SEEK_SET );
-	ftruncate ( 2, 0 );
+
+	if ( ftruncate ( 2, 0 ) == -1 )
+		throw::exception::CommonException ( "MeasurementProvisioner: ftruncate failed" );
+
 	return buffer.str ( );
 }
 
-- 
GitLab