From 98170010ee92c807650bd529216612532975c14e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 28 May 2014 15:51:47 +1000 Subject: The UUID faking code is common enough to stick it in a macro. --- src/love/love.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/love') diff --git a/src/love/love.c b/src/love/love.c index dc27d9c..7d50917 100644 --- a/src/love/love.c +++ b/src/love/love.c @@ -146,7 +146,7 @@ static void dirList_compile(const char *name, const char *path, void *data) scriptCount++; gettimeofday(&me->startTime, NULL); - snprintf(me->SID, sizeof(me->SID), "%08lx-%04lx-%04lx-%04lx-%012lx", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); + snprintf(me->SID, sizeof(me->SID), FAKE_UUID); snprintf(me->fileName, sizeof(me->fileName), "%s/%s", path, name); eina_hash_add(ourGlobals->scripts, me->SID, me); sendForth(ourGlobals->serverLuaSL, me->SID, "compile(%s)", me->fileName); @@ -431,7 +431,7 @@ static Eina_Bool _dataLuaSL(void *data, int type, Ecore_Con_Event_Server_Data *e } } while (temp && (0 < lineNo--)); - sprintf(key, "%08lx-%04lx-%04lx-%04lx-%012lx", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); + sprintf(key, FAKE_UUID); sendForth(ourGlobals->serverLuaSL, SID, "return \"%s\"", key); // TODO - For now, just send it to everyone. -- cgit v1.1