Re: [PATCH] totemcrypto: major code cleanup (no functional or onwire changes)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Really good work

Reviewed-by: Jan Friesse <jfriesse@xxxxxxxxxx>

Fabio M. Di Nitto napsal(a):
From: "Fabio M. Di Nitto"<fdinitto@xxxxxxxxxx>

- cleanup include list
- reorder code and functions (crypto then hash)
- split crypt/decrypt/hash functions
- some micro optimizations by dropping a few memcpy
- make the code more readable (better var names and buffers mapping)
- improve exit paths on error (return codes and free)
- store crypto header size instead of recalculating it per packet

Signed-off-by: Fabio M. Di Nitto<fdinitto@xxxxxxxxxx>
---
  exec/totemcrypto.c |  632 +++++++++++++++++++++++++---------------------------
  1 files changed, 304 insertions(+), 328 deletions(-)

diff --git a/exec/totemcrypto.c b/exec/totemcrypto.c
index 8b21533..49ed00e 100644
--- a/exec/totemcrypto.c
+++ b/exec/totemcrypto.c
@@ -6,6 +6,7 @@
   * Author: Steven Dake (sdake@xxxxxxxxxx)
   *         Christine Caulfield (ccaulfie@xxxxxxxxxx)
   *         Jan Friesse (jfriesse@xxxxxxxxxx)
+ *         Fabio M. Di Nitto (fdinitto@xxxxxxxxxx)
   *
   * This software licensed under BSD license, the text of which follows:
   *
@@ -34,42 +35,7 @@
   * THE POSSIBILITY OF SUCH DAMAGE.
   */

-#include<config.h>
-
-#include<assert.h>
-#include<pthread.h>
-#include<sys/mman.h>
-#include<sys/types.h>
-#include<sys/stat.h>
-#include<sys/socket.h>
-#include<netdb.h>
-#include<sys/un.h>
-#include<sys/ioctl.h>
-#include<sys/param.h>
-#include<netinet/in.h>
-#include<arpa/inet.h>
-#include<unistd.h>
-#include<fcntl.h>
...
_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux