X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Fmessage_id.c;h=d1efd9d73904cc5793b2e3c6d3637280f33d0ff4;hb=015e83362f21a061bf268b878693d72309c21e55;hp=adf45cdf65deeaaecf33dd7b0be10d7357324d78;hpb=8139180649a758e0766757952e87b20e88fdd3ed;p=mmh diff --git a/sbr/message_id.c b/sbr/message_id.c index adf45cd..d1efd9d 100644 --- 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; } } }