projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8139180
)
Tidied up for loop in message_id().
author
David Levine
<levinedl@acm.org>
Sun, 22 Jul 2012 01:00:14 +0000
(20:00 -0500)
committer
David Levine
<levinedl@acm.org>
Sun, 22 Jul 2012 01:00:14 +0000
(20:00 -0500)
sbr/message_id.c
patch
|
blob
|
history
diff --git
a/sbr/message_id.c
b/sbr/message_id.c
index
adf45cd
..
d1efd9d
100644
(file)
--- a/
sbr/message_id.c
+++ b/
sbr/message_id.c
@@
-75,16
+75,18
@@
message_id (time_t tclock, int content_id) {
}
{
- char *cp = (char *) rnd_base64;
+ char *cp;
/* Try to make the base64 string look a little more like a
hostname by replacing + with - and / with _. Also, the
format string inserts a couple of dots. */
- for ( ; *cp; ++cp) {
+ for (cp = (char *) rnd_base64; *cp; ++cp) {
char *plus, *slash;
if ((plus = strchr (cp, '+'))) {
*plus = '-';
} else if ((slash = strchr (cp, '/'))) {
*slash = '_';
+ } else {
+ break;
}
}
}