diff --git a/Compiler/Algorithm.mo b/Compiler/Algorithm.mo index 4674b666471..cddd8e9bc8d 100644 --- a/Compiler/Algorithm.mo +++ b/Compiler/Algorithm.mo @@ -79,6 +79,16 @@ algorithm end matchcontinue; end algorithmEmpty; +public function isReinitStatement "returns true if statement is a reinit" + input Statement stmt; + output Boolean res; +algorithm + res := matchcontinue(stmt) + case(DAE.STMT_REINIT(var = _)) then true; + case(_) then false; + end matchcontinue; +end isReinitStatement; + public function splitReinits "" input list inAlgs; output list reinits; diff --git a/Compiler/runtime/systemimpl.c b/Compiler/runtime/systemimpl.c index cec86584ed3..057ed387e8b 100644 --- a/Compiler/runtime/systemimpl.c +++ b/Compiler/runtime/systemimpl.c @@ -40,6 +40,7 @@ #include #endif + /* * Common includes */ @@ -2219,8 +2220,9 @@ RML_BEGIN_LABEL(System__getUUIDStr) { char outStr[36]; char *uuidStr; - memset(&uuidStr,0,sizeof(char)*36); UUID uuid; + memset(&uuidStr,0,sizeof(char)*36); + if (UuidCreate(&uuid) == RPC_S_OK) UuidToString(&uuid, (unsigned char **)(&uuidStr)); uuidStr[36] = '\0';