X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=cmdgen.c;h=5042aa4e9affaab8c4c00d860290c4ecc40ddf1f;hb=06434ffc713ff60f7631b48e0b1463fcfc92684b;hp=42772aa365ec2813217fcaddb89ad2c02991b987;hpb=36694012169a241db6bceb68d7e0365c6816b9d9;p=PuTTY.git diff --git a/cmdgen.c b/cmdgen.c index 42772aa3..5042aa4e 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -602,19 +602,17 @@ int main(int argc, char **argv) if (keytype != NOKEYGEN) { char *entropy; char default_comment[80]; - time_t t; - struct tm *tm; + struct tm tm; struct progress prog; prog.phase = -1; prog.current = -1; - time(&t); - tm = localtime(&t); + tm = ltime(); if (keytype == DSA) - strftime(default_comment, 30, "dsa-key-%Y%m%d", tm); + strftime(default_comment, 30, "dsa-key-%Y%m%d", &tm); else - strftime(default_comment, 30, "rsa-key-%Y%m%d", tm); + strftime(default_comment, 30, "rsa-key-%Y%m%d", &tm); random_ref(); entropy = get_random_data(bits / 8);