# HG changeset patch # User Andre Heinecke # Date 1394790462 0 # Node ID 5cb1eb928253240770aceb1807cc33d5c437abe8 # Parent ee27186fc8e63d7ab0eaf49ec4a569352f068afa Clean up debug output / functions diff -r ee27186fc8e6 -r 5cb1eb928253 common/listutil.c --- a/common/listutil.c Fri Mar 14 09:05:23 2014 +0000 +++ b/common/listutil.c Fri Mar 14 09:47:42 2014 +0000 @@ -24,11 +24,6 @@ #define MAX_FILESIZE 1048576 /* 1024*1024 */ -void handle_errno() -{ - printf("Error: %s \n", strerror(errno)); -} - /** * @brief Read a file into memory. * @@ -118,12 +113,10 @@ /* Hash algroithm is sha256 */ unsigned char hash[32]; - printf ("size: %lu", (unsigned long) size); - /* Fetch the signature from the first line od data */ p = strchr(data, '\r'); if (p == 0 || (unsigned int)(p - (data + 2)) != sig_b64_size) { - printf("Invalid data. Signature might be too long.\n"); +/* printf("Invalid data. Signature might be too long.\n"); */ return -1; } strncpy(signature_b64, data + 2, sig_b64_size); @@ -133,7 +126,7 @@ (unsigned char *)signature_b64, sig_b64_size); if (ret != 0 || sig_size != 384) { - printf("failed to decode signature\n"); +/* printf("failed to decode signature\n"); */ return -1; } @@ -193,6 +186,7 @@ ret = read_file(file_name, data, size, MAX_FILESIZE); + /* printf ("Ret: %i \n", ret); */ if (ret != 0) { if (ret == READ_FILE_TOO_LARGE) { return TooLarge; @@ -207,6 +201,7 @@ } if (!*data || !*size) { + /* File is probably empty */ return UnknownError; }