X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Ftools.c;h=db8fe3af8f2809f79c1b78808c86bd547a18d7fd;hb=c15bc2e974019d14914ee01696cd2487f8908931;hp=0c012e7955e184d128b589ad547b1bf645ebb767;hpb=98c6d07ff027ddc7c2bd74987b4f70642b159c7c;p=citadel.git diff --git a/libcitadel/lib/tools.c b/libcitadel/lib/tools.c index 0c012e795..db8fe3af8 100644 --- a/libcitadel/lib/tools.c +++ b/libcitadel/lib/tools.c @@ -858,11 +858,8 @@ char *strcpy(char *dest, const char *src) { * Generate a new, globally unique UID parameter for a calendar etc. object */ void generate_uuid(char *buf) { - static int seq = (-1); + static int seq = 0; - if (seq == (-1)) { - seq = (int)rand(); - } ++seq; seq = (seq % 0x0FFF) ;