Mercurial > hg > mlmmj
changeset 764:dd5b87ddd51e
Make *all* random strings produced the same length
author | Ben Schmidt |
---|---|
date | Wed, 20 Oct 2010 12:34:28 +1100 |
parents | c7d0a386aef5 |
children | e08598db1be1 |
files | src/strgen.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/strgen.c Wed Oct 20 11:39:58 2010 +1100 +++ b/src/strgen.c Wed Oct 20 12:34:28 2010 +1100 @@ -62,7 +62,7 @@ MY_ASSERT(atsign); *atsign = '='; - snprintf(dest, len, "%x%x-%s", random_int(), random_int(), tmpstr); + snprintf(dest, len, "%08x%08x-%s", random_int(), random_int(), tmpstr); myfree(tmpstr); @@ -268,7 +268,7 @@ { char buf[256]; - snprintf(buf, sizeof(buf), "Message-ID: <%ld-%d-mlmmj-%x@%s>\n", + snprintf(buf, sizeof(buf), "Message-ID: <%ld-%d-mlmmj-%08x@%s>\n", (long int)time(NULL), (int)getpid(), random_int(), fqdn); return mystrdup(buf);