[or-cvs] Remove bugfixes that did not actually do anything, before w...

Nick Mathewson nickm at seul.org
Mon Dec 13 18:48:15 UTC 2004


Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv29824/src/or

Modified Files:
	control.c 
Log Message:
Remove bugfixes that did not actually do anything, before we start a cargo cult.

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- control.c	13 Dec 2004 18:32:29 -0000	1.36
+++ control.c	13 Dec 2004 18:48:12 -0000	1.37
@@ -332,16 +332,9 @@
 int
 decode_hashed_password(char *buf, const char *hashed)
 {
-  size_t len = strlen(hashed)+2;
-  char *base64 = tor_malloc(len);
   char decoded[64];
-  int r;
-  if (tor_snprintf(base64, len, "%s\n", hashed)<0)
-    return -1;
-  if ((r =  base64_decode(decoded, sizeof(decoded),
-                          base64, strlen(base64))) !=
-      S2K_SPECIFIER_LEN+DIGEST_LEN) {
-    printf("BB %d\n",r);
+  if (base64_decode(decoded, sizeof(decoded), hashed, strlen(hashed))
+      != S2K_SPECIFIER_LEN+DIGEST_LEN) {
     return -1;
   }
   if (buf)



More information about the tor-commits mailing list