[Forensics-changes] [yara] 139/192: Eliminate trailing space in hex string output (#638)

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:31:57 UTC 2017


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

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

commit d704a70bc97c823a5afdb3e1f2e897f071e165ec
Author: Hilko Bengen <hillu at users.noreply.github.com>
Date:   Tue Apr 18 21:47:07 2017 +0200

    Eliminate trailing space in hex string output (#638)
    
    Close #636
---
 yara.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/yara.c b/yara.c
index c1a6cd2..9400cbd 100644
--- a/yara.c
+++ b/yara.c
@@ -484,12 +484,9 @@ void print_hex_string(
     int length)
 {
   for (int i = 0; i < min(32, length); i++)
-    printf("%02X ", (uint8_t) data[i]);
+    printf("%s%02X", (i == 0 ? "" : " "), (uint8_t) data[i]);
 
-  if (length > 32)
-    printf("...");
-
-  printf("\n");
+  puts(length > 32 ? " ..." : "");
 }
 
 

-- 
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