diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-23 02:21:25 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-23 02:21:25 +0800 |
commit | 1cdf318f40969ef8df3f2671f9a338951e644cd9 (patch) | |
tree | b586ec3fa38a3f66a5c8ebebcd0ecdaa057ff0d6 /util | |
parent | 3b41c215b669ac33a15f4f9e697e1d59fe180a99 (diff) | |
download | pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.tar pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.tar.gz pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.tar.bz2 pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.tar.lz pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.tar.xz pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.tar.zst pttbbs-1cdf318f40969ef8df3f2671f9a338951e644cd9.zip |
fix record.c stamp preformance
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@337 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/util_record.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/util_record.c b/util/util_record.c index ad129638..8f1c9d02 100644 --- a/util/util_record.c +++ b/util/util_record.c @@ -1,4 +1,4 @@ -/* $Id: util_record.c,v 1.1 2002/03/07 15:13:46 in2 Exp $ */ +/* $Id: util_record.c,v 1.2 2002/06/22 18:21:25 ptt Exp $ */ #include <stdio.h> #include <errno.h> #include <string.h> @@ -157,7 +157,7 @@ int stampfile(char *fpath, fileheader_t *fh) { while (*(++ip)); *ip++ = '/'; do { - sprintf(ip, "M.%ld.A", ++dtime ); + sprintf(ip, "M.%ld.A.%3.3X", ++dtime, rand()&0xfff ); if(fp == -1 && errno != EEXIST) return -1; } while((fp = open(fpath, O_CREAT | O_EXCL | O_WRONLY, 0644)) == -1); |