mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
fix typos, streamline
svn:r337
This commit is contained in:
parent
8d4cd5d604
commit
968d31162b
@ -179,7 +179,7 @@ crypto_create_init_cipher(int cipher_type, char *key, char *iv, int encrypt_mode
|
|||||||
r = crypto_cipher_decrypt_init_cipher(crypto);
|
r = crypto_cipher_decrypt_init_cipher(crypto);
|
||||||
|
|
||||||
if (r) {
|
if (r) {
|
||||||
log_fn(LOG_ERR, "Unabble to initialize cipher: %s", crypto_perror());
|
log_fn(LOG_ERR, "Unable to initialize cipher: %s", crypto_perror());
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
return crypto;
|
return crypto;
|
||||||
@ -800,7 +800,6 @@ int crypto_seed_rng()
|
|||||||
f = fopen(filenames[i], "rb");
|
f = fopen(filenames[i], "rb");
|
||||||
if (!f) continue;
|
if (!f) continue;
|
||||||
log_fn(LOG_INFO, "Seeding RNG from %s", filenames[i]);
|
log_fn(LOG_INFO, "Seeding RNG from %s", filenames[i]);
|
||||||
buf[20]='\xff';
|
|
||||||
n = fread(buf, 1, 20, f);
|
n = fread(buf, 1, 20, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
if (n != 20) {
|
if (n != 20) {
|
||||||
|
@ -6,14 +6,6 @@
|
|||||||
* Nick Mathewson <nickm@freehaven.net>
|
* Nick Mathewson <nickm@freehaven.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Changes :
|
|
||||||
* $Log$
|
|
||||||
* Revision 1.1 2002/09/03 18:43:50 nickm
|
|
||||||
* Add function to fake a poll call using select
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#include "fakepoll.h"
|
#include "fakepoll.h"
|
||||||
|
|
||||||
#ifdef USE_FAKE_POLL
|
#ifdef USE_FAKE_POLL
|
||||||
|
@ -6,16 +6,6 @@
|
|||||||
* Nick Mathewson <nickm@freehaven.net>
|
* Nick Mathewson <nickm@freehaven.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* Changes :
|
|
||||||
* $Log$
|
|
||||||
* Revision 1.2 2003/05/09 02:25:37 nickm
|
|
||||||
* work on versioning; new log_fn function
|
|
||||||
*
|
|
||||||
* Revision 1.1 2002/09/03 18:43:50 nickm
|
|
||||||
* Add function to fake a poll call using select
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef __FAKEPOLL_H
|
#ifndef __FAKEPOLL_H
|
||||||
#define __FAKEPOLL_H
|
#define __FAKEPOLL_H
|
||||||
|
|
||||||
|
@ -44,14 +44,6 @@ tv_udiff(struct timeval *start, struct timeval *end)
|
|||||||
return LONG_MAX;
|
return LONG_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
This is a no-op: "secdiff--" takes 1M from the final result,
|
|
||||||
and "end_usec+=100000L" puts it back.
|
|
||||||
if (end_usec < start->tv_usec) {
|
|
||||||
secdiff--;
|
|
||||||
end_usec += 1000000L;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
udiff = secdiff*1000000L + (end_usec - start->tv_usec);
|
udiff = secdiff*1000000L + (end_usec - start->tv_usec);
|
||||||
if(udiff < 0) {
|
if(udiff < 0) {
|
||||||
log_fn(LOG_NOTICE, "start is after end. Returning 0.");
|
log_fn(LOG_NOTICE, "start is after end. Returning 0.");
|
||||||
|
Loading…
Reference in New Issue
Block a user