summaryrefslogtreecommitdiff
path: root/liboffloadmic
diff options
context:
space:
mode:
authorIlya Verbin <ilya.verbin@intel.com>2015-09-28 16:10:16 +0000
committerIlya Verbin <iverbin@gcc.gnu.org>2015-09-28 16:10:16 +0000
commitdb7b65ff7233f94a2b9a5ae8bb2c5ab57050e9e8 (patch)
tree009cf8310e953b71cb0bccb70a7da17639914e3a /liboffloadmic
parent070fb1f63b23b3bc89eaaca5aa5359973d57cc14 (diff)
downloadgcc-db7b65ff7233f94a2b9a5ae8bb2c5ab57050e9e8.tar.gz
re PR other/67652 (liboffloadmic/runtime/offload_engine.cpp:176: strange expression in sizeof ?)
PR other/67652 liboffloadmic/ * runtime/offload_engine.cpp (Engine::init_process): Fix sizeof. From-SVN: r228210
Diffstat (limited to 'liboffloadmic')
-rw-r--r--liboffloadmic/ChangeLog5
-rw-r--r--liboffloadmic/runtime/offload_engine.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog
index 4a726c8636d..130026dd041 100644
--- a/liboffloadmic/ChangeLog
+++ b/liboffloadmic/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-28 Ilya Verbin <ilya.verbin@intel.com>
+
+ PR other/67652
+ * runtime/offload_engine.cpp (Engine::init_process): Fix sizeof.
+
2015-09-08 Ilya Verbin <ilya.verbin@intel.com>
* Makefile.am (liboffloadmic_host_la_DEPENDENCIES): Remove libcoi_host
diff --git a/liboffloadmic/runtime/offload_engine.cpp b/liboffloadmic/runtime/offload_engine.cpp
index 16b440d7ab6..00b673aebcb 100644
--- a/liboffloadmic/runtime/offload_engine.cpp
+++ b/liboffloadmic/runtime/offload_engine.cpp
@@ -173,7 +173,7 @@ void Engine::init_process(void)
// use putenv instead of setenv as Windows has no setenv.
// Note: putenv requires its argument can't be freed or modified.
// So no free after call to putenv or elsewhere.
- char * env_var = (char*) malloc(sizeof("COI_DMA_CHANNEL_COUNT=2" + 1));
+ char * env_var = (char*) malloc(sizeof("COI_DMA_CHANNEL_COUNT=2"));
sprintf(env_var, "COI_DMA_CHANNEL_COUNT=2");
putenv(env_var);
}