]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-hex-dump-20070919
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Sep 2007 22:29:29 +0000 (22:29 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Sep 2007 22:29:29 +0000 (22:29 +0000)
remove the broken percent quoting from OutputDebugHexDump as it is
not required.  We never use the resulting string as a print format string.

(cherry picked from commit a186b0d65c00a338995ad1f6379ef232742ab224)

src/WINNT/afsd/smb3.c

index 0cdd503943cc9a443deebce6a3ab23773a5edbdd..a6fa124153a9423e127f9d91b4f692313b67fd2f 100644 (file)
@@ -158,7 +158,7 @@ void OutputDebugF(char * format, ...) {
 }
 
 void OutputDebugHexDump(unsigned char * buffer, int len) {
-    int i,j,k,pcts=0;
+    int i,j,k;
     char buf[256];
     static char tr[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
 
@@ -183,13 +183,9 @@ void OutputDebugHexDump(unsigned char * buffer, int len) {
         buf[j] = tr[k / 16]; buf[j+1] = tr[k % 16];
 
         j = (i%16);
-        j = j + 56 + ((j>7)?1:0) + pcts;
+        j = j + 56 + ((j>7)?1:0);
 
         buf[j] = (k>32 && k<127)?k:'.';
-               if (k == '%') {
-                       buf[++j] = k;
-                       pcts++;
-               }
     }    
     if(i) {
         osi_Log0(smb_logp, osi_LogSaveString(smb_logp, buf));