From: Frederic Suter Date: Thu, 3 Aug 2017 09:17:50 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_17~274 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a16ca05f4f79be7979ee3425e9bcae5633201d06?hp=6325e7c528bcaff5a625184cf6a888f8151e494a Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/src/bindings/lua/lua_platf.cpp b/src/bindings/lua/lua_platf.cpp index c2219f70a1..52510d889b 100644 --- a/src/bindings/lua/lua_platf.cpp +++ b/src/bindings/lua/lua_platf.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010, 2012-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -507,26 +506,23 @@ int console_AS_seal(lua_State *L) { } int console_host_set_property(lua_State *L) { - const char* name =""; - const char* prop_id = ""; - const char* prop_value = ""; lua_ensure(lua_istable(L, -1), "Bad Arguments to create link, Should be a table with named arguments"); // get Host id lua_pushstring(L, "host"); lua_gettable(L, -2); - name = lua_tostring(L, -1); + const char* name = lua_tostring(L, -1); lua_pop(L, 1); // get prop Name lua_pushstring(L, "prop"); lua_gettable(L, -2); - prop_id = lua_tostring(L, -1); + const char* prop_id = lua_tostring(L, -1); lua_pop(L, 1); //get args lua_pushstring(L,"value"); lua_gettable(L, -2); - prop_value = lua_tostring(L,-1); + const char* prop_value = lua_tostring(L, -1); lua_pop(L, 1); sg_host_t host = sg_host_by_name(name);