diff options
author | rsc <devnull@localhost> | 2006-04-01 19:24:03 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-04-01 19:24:03 +0000 |
commit | cbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch) | |
tree | e0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/cmd/auth/secstore/SConn.c | |
parent | 226d80b8213821af0cbf092d1507c52b504fd368 (diff) | |
download | plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.gz plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.bz2 plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.zip |
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
Diffstat (limited to 'src/cmd/auth/secstore/SConn.c')
-rw-r--r-- | src/cmd/auth/secstore/SConn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/auth/secstore/SConn.c b/src/cmd/auth/secstore/SConn.c index 7a8654ac..9ad9a7cc 100644 --- a/src/cmd/auth/secstore/SConn.c +++ b/src/cmd/auth/secstore/SConn.c @@ -13,8 +13,8 @@ typedef struct ConnState { } ConnState; typedef struct SS{ - int fd; // file descriptor for read/write of encrypted data - int alg; // if nonzero, "alg sha rc4_128" + int fd; /* file descriptor for read/write of encrypted data */ + int alg; /* if nonzero, "alg sha rc4_128" */ ConnState in, out; } SS; @@ -31,7 +31,7 @@ SC_secret(SConn *conn, uchar *sigma, int direction) hmac_sha1(sigma, nsigma, (uchar*)"two", 3, ss->out.secret, nil); hmac_sha1(sigma, nsigma, (uchar*)"one", 3, ss->in.secret, nil); } - setupRC4state(&ss->in.rc4, ss->in.secret, 16); // restrict to 128 bits + setupRC4state(&ss->in.rc4, ss->in.secret, 16); /* restrict to 128 bits */ setupRC4state(&ss->out.rc4, ss->out.secret, 16); ss->alg = 1; return 0; @@ -82,7 +82,7 @@ SC_read(SConn *conn, uchar *buf, int n) snprint((char*)buf,n,"!SC_read invalid count"); return -1; } - len = (count[0]&0x7f)<<8 | count[1]; // SSL-style count; no pad + len = (count[0]&0x7f)<<8 | count[1]; /* SSL-style count; no pad */ if(ss->alg){ len -= SHA1dlen; if(len <= 0 || readn(ss->fd, digest, SHA1dlen) != SHA1dlen){ |