Commit db7b65ff by Ilya Verbin Committed by Ilya Verbin

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
parent 070fb1f6
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> 2015-09-08 Ilya Verbin <ilya.verbin@intel.com>
* Makefile.am (liboffloadmic_host_la_DEPENDENCIES): Remove libcoi_host * Makefile.am (liboffloadmic_host_la_DEPENDENCIES): Remove libcoi_host
......
...@@ -173,7 +173,7 @@ void Engine::init_process(void) ...@@ -173,7 +173,7 @@ void Engine::init_process(void)
// use putenv instead of setenv as Windows has no setenv. // use putenv instead of setenv as Windows has no setenv.
// Note: putenv requires its argument can't be freed or modified. // Note: putenv requires its argument can't be freed or modified.
// So no free after call to putenv or elsewhere. // 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"); sprintf(env_var, "COI_DMA_CHANNEL_COUNT=2");
putenv(env_var); putenv(env_var);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment