[pmg-devel] [PATCH pmg-log-filter v2 5/8] minor type fixes

Dominik Csapak d.csapak at proxmox.com
Thu Feb 21 09:42:04 CET 2019


log->linenr is an unsigned long, we want to log it as a whole
mygzgetc returns a char anyway so change it to reflect that

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 pmg-log-tracker.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pmg-log-tracker.c b/pmg-log-tracker.c
index 37f59c6..e2827e1 100644
--- a/pmg-log-tracker.c
+++ b/pmg-log-tracker.c
@@ -498,7 +498,7 @@ loglist_print (LogList *loglist)
 {
   LogEntry *log = loglist->log;
   while (log) {
-    printf ("L%08X %s", log->linenr, log->text);
+    printf ("L%08lX %s", log->linenr, log->text);
     log = log->next;
   }
 }
@@ -1745,7 +1745,7 @@ print_usage (const char *name)
 
 // gzgets is ways too slow, so we do it our own way
 
-static int
+static char
 mygzgetc (gzFile stream)
 {
   int br;
@@ -1768,7 +1768,7 @@ mygzgetc (gzFile stream)
 static char *
 mygzgets (gzFile stream, char *line, int bufsize)
 {
-  int c=0;
+  char c=0;
   char *cpos;
 
   cpos = line;
-- 
2.11.0




More information about the pmg-devel mailing list