windows-hex-dump-20070919
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Sep 2007 22:27:53 +0000 (22:27 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Sep 2007 22:27:53 +0000 (22:27 +0000)
remove the broken percent quoting from OutputDebugHexDump as it is
not required.  We never use the resulting string as a print format string.

src/WINNT/afsd/smb3.c

index f2005fc..078ed5d 100644 (file)
@@ -156,7 +156,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'};
 
@@ -181,13 +181,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));