From cbeb0b26e4c7caa8d1b47de791a7418dc20a4567 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 1 Apr 2006 19:24:03 +0000 Subject: Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. --- src/cmd/auth/secstore/secstore.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/cmd/auth/secstore/secstore.c') diff --git a/src/cmd/auth/secstore/secstore.c b/src/cmd/auth/secstore/secstore.c index cb6e585e..571c6fae 100644 --- a/src/cmd/auth/secstore/secstore.c +++ b/src/cmd/auth/secstore/secstore.c @@ -142,8 +142,8 @@ getfile(SConn *conn, char *gf, uchar **buf, ulong *buflen, uchar *key, int nkey) return 0; } -// This sends a file to the secstore disk that can, in an emergency, be -// decrypted by the program aescbc.c. +/* This sends a file to the secstore disk that can, in an emergency, be */ +/* decrypted by the program aescbc.c. */ static int putfile(SConn *conn, char *pf, uchar *buf, ulong len, uchar *key, int nkey) { @@ -206,7 +206,7 @@ putfile(SConn *conn, char *pf, uchar *buf, ulong len, uchar *key, int nkey) ivo = 0; if(n < Maxmsg){ /* EOF on input; append XX... */ memset(b+n, 'X', CHK); - n += CHK; // might push n>Maxmsg + n += CHK; /* might push n>Maxmsg */ done = 1; } aesCBCencrypt(b, n, &aes); @@ -255,7 +255,7 @@ cmd(AuthConn *c, char **gf, int *Gflag, char **pf, char **rf) if(getfile(c->conn, *gf, *Gflag ? &memfile : nil, &len, (uchar*)c->pass, c->passlen) < 0) goto Out; if(*Gflag){ - // write one line at a time, as required by /mnt/factotum/ctl + /* write one line at a time, as required by /mnt/factotum/ctl */ memcur = memfile; while(len>0){ memnext = (uchar*)strchr((char*)memcur, '\n'); @@ -309,7 +309,7 @@ chpasswd(AuthConn *c, char *id) H = mpnew(0); Hi = mpnew(0); - // changing our password is vulnerable to connection failure + /* changing our password is vulnerable to connection failure */ for(;;){ snprint(prompt, sizeof(prompt), "new password for %s: ", id); newpass = readcons(prompt, nil, 1); @@ -392,7 +392,7 @@ login(char *id, char *dest, int pass_stdin, int pass_nvram) strecpy(c->pass, c->pass+sizeof c->pass, nvr.config); } if(pass_stdin){ - n = readn(0, s, Maxmsg-2); // so len(PINSTA)