chat_init(): Fix problematic ptrdiff_t format string handling
authorPetr Baudis <pasky@ucw.cz>
Thu, 9 Aug 2012 22:09:42 +0000 (10 00:09 +0200)
committerPetr Baudis <pasky@ucw.cz>
Thu, 9 Aug 2012 22:09:42 +0000 (10 00:09 +0200)
Introduced in commit 2e8729f.

chat.c

diff --git a/chat.c b/chat.c
index 76d8a4e..bcee122 100644 (file)
--- a/chat.c
+++ b/chat.c
@@ -59,10 +59,10 @@ void chat_init(char *chat_file) {
                }
        }
        if (!feof(f))
-               fprintf(stderr, "syntax error around line %u in %s\n", (uintptr_t)(entry - chat_table), chat_file);
+               fprintf(stderr, "syntax error around line %tu in %s\n", entry - chat_table, chat_file);
        fclose(f);
        if (DEBUGL(1))
-               fprintf(stderr, "Loaded %u chat entries from %s\n", (uintptr_t)(entry - chat_table), chat_file);
+               fprintf(stderr, "Loaded %tu chat entries from %s\n", entry - chat_table, chat_file);
 }
 
 void chat_done() {