[Forensics-changes] [yara] 71/368: Indent using spaces

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.5.0
in repository yara.

commit 7e14ce23b612bcc54975653de00857112f3e6328
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date:   Wed Sep 23 17:34:47 2015 +0200

    Indent using spaces
---
 libyara/modules/hash.c |  2 +-
 libyara/modules/math.c | 10 +++++-----
 libyara/modules/pe.c   | 29 ++++++++++++++++-------------
 3 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/libyara/modules/hash.c b/libyara/modules/hash.c
index dbfcf58..79b183f 100644
--- a/libyara/modules/hash.c
+++ b/libyara/modules/hash.c
@@ -327,7 +327,7 @@ define_function(data_checksum32)
     if (offset >= block->base &&
         offset < block->base + block->size)
     {
-	  size_t i;
+      size_t i;
 
       size_t data_offset = (size_t) (offset - block->base);
       size_t data_len = (size_t) yr_min(length, block->size - data_offset);
diff --git a/libyara/modules/math.c b/libyara/modules/math.c
index 1460170..c96de3e 100644
--- a/libyara/modules/math.c
+++ b/libyara/modules/math.c
@@ -185,7 +185,7 @@ define_function(data_deviation)
     {
       size_t data_offset = offset - block->base;
       size_t data_len = (size_t) yr_min(
-		  length, (size_t) (block->size - data_offset));
+          length, (size_t) (block->size - data_offset));
 
       total_len += data_len;
       offset += data_len;
@@ -421,9 +421,9 @@ define_function(data_monte_carlo_pi)
     if (offset >= block->base &&
         offset < block->base + block->size)
     {
-	  unsigned int monte[6];
+      unsigned int monte[6];
 
-	  size_t data_offset = offset - block->base;
+      size_t data_offset = offset - block->base;
       size_t data_len = (size_t) yr_min(
           length, (size_t) (block->size - data_offset));
 
@@ -436,11 +436,11 @@ define_function(data_monte_carlo_pi)
 
         if (i % 6 == 5)
         { 
-	      double mx = 0;
+          double mx = 0;
           double my = 0;
           int j;
 
-		  mcount++;
+          mcount++;
 
           for (j = 0; j < 3; j++)
           {
diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index af95278..cfc8416 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -438,7 +438,7 @@ uint8_t* parse_resource_name(
 
   if (entry->Name & 0x80000000)
   {
-	DWORD length;
+    DWORD length;
 
     uint8_t* rsrc_str_ptr = rsrc_data + (entry->Name & 0x7FFFFFFF);
 
@@ -557,6 +557,7 @@ int _pe_iterate_resources(
       {
         return RESOURCE_ITERATOR_ABORTED;
       }
+
       result = callback(
           data_entry,
           *type,
@@ -601,7 +602,7 @@ int pe_iterate_resources(
 
   if (directory->VirtualAddress != 0)
   {
-	PIMAGE_RESOURCE_DIRECTORY rsrc_dir;
+    PIMAGE_RESOURCE_DIRECTORY rsrc_dir;
 
     offset = pe_rva_to_offset(pe, directory->VirtualAddress);
 
@@ -1128,9 +1129,9 @@ void pe_parse_certificates(
          (uint8_t*) win_cert + sizeof(WIN_CERTIFICATE) <= eod &&
          (uint8_t*) win_cert->Certificate + win_cert->Length - 8 <= eod)
   {
-	BIO* cert_bio;
-	PKCS7* pkcs7;
-	STACK_OF(X509)* certs;
+    BIO* cert_bio;
+    PKCS7* pkcs7;
+    STACK_OF(X509)* certs;
 
     // Some sanity checks
 
@@ -1170,12 +1171,13 @@ void pe_parse_certificates(
 
     for (i = 0; i < sk_X509_num(certs); i++)
     {
-	  ASN1_INTEGER* serial;
-      X509* cert = sk_X509_value(certs, i);
-
-	  const char* sig_alg;
+      const char* sig_alg;
       char buffer[256];
 
+      ASN1_INTEGER* serial;
+
+      X509* cert = sk_X509_value(certs, i);
+
       X509_NAME_oneline(
           X509_get_issuer_name(cert), buffer, sizeof(buffer));
 
@@ -1209,7 +1211,7 @@ void pe_parse_certificates(
 
         if (serial_number != NULL)
         {
-		  int j;
+          int j;
 
           for (j = 0; j < serial->length; j++)
           {
@@ -1557,9 +1559,10 @@ define_function(imphash)
 
   while (dll)
   {  
-	IMPORTED_FUNCTION* func;
+    IMPORTED_FUNCTION* func;
+
     size_t dll_name_len;
-	char* dll_name;
+    char* dll_name;
 
     // If extension is 'ocx', 'sys' or 'dll', chop it.
 
@@ -1589,7 +1592,7 @@ define_function(imphash)
 
     while (func)
     {
-	  char* final_name;
+      char* final_name;
       size_t final_name_len = dll_name_len + strlen(func->name) + 1;
 
       if (!first)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list