~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Catch up with new CGI location
[disorder]
/
lib
/
random.c
diff --git
a/lib/random.c
b/lib/random.c
index
21d0b09
..
ce87abd
100644
(file)
--- a/
lib/random.c
+++ b/
lib/random.c
@@
-23,13
+23,11
@@
*
*/
*
*/
-#include <config.h>
-#include "types.h"
+#include "common.h"
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
-#include <string.h>
#include "random.h"
#include "log.h"
#include "random.h"
#include "log.h"
@@
-83,7
+81,7
@@
char *random_id(void) {
char id[128];
random_get(words, sizeof words);
char id[128];
random_get(words, sizeof words);
- basen(words,
4
, id, sizeof id, 62);
+ basen(words,
sizeof words / sizeof *words
, id, sizeof id, 62);
return xstrdup(id);
}
return xstrdup(id);
}