]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Use the same variable type in a message
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 2 Apr 2015 19:16:14 +0000 (21:16 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 2 Apr 2015 19:16:14 +0000 (21:16 +0200)
To reduce the number of messages to translate, the index reported in the
message is always an int. There was no reasons to use something else in the
first place.

util.c

diff --git a/util.c b/util.c
index fc9fece92b5114680035db40602ffaadb7e0cd33..095cf07e10329b8b6f4fb1d4fa133f87d08246ea 100644 (file)
--- a/util.c
+++ b/util.c
@@ -260,7 +260,7 @@ int getword_atoi(int *number, struct getwordstruct *gwarea, char stop)
 
 int getword_atol(long int *number, struct getwordstruct *gwarea, char stop)
 {
-       long int x;
+       int x;
        long int sign=+1;
        int digit;
 
@@ -280,7 +280,7 @@ int getword_atol(long int *number, struct getwordstruct *gwarea, char stop)
                *number=(*number * 10) + digit;
        }
        if(gwarea->current[x] && gwarea->current[x]!=stop) {
-               debuga(_("End of number not found in %s after %ld bytes.\n"),__func__,x);
+               debuga(_("End of number not found in %s after %d bytes.\n"),__func__,x);
                debuga(_("Line=\"%s\"\n"),gwarea->beginning);
                debuga(_("Record=\"%s\"\n"),gwarea->current);
                debuga(_("searching for \'x%x\'\n"),stop);
@@ -298,7 +298,7 @@ int getword_atol(long int *number, struct getwordstruct *gwarea, char stop)
 
 int getword_atolu(unsigned long int *number, struct getwordstruct *gwarea, char stop)
 {
-       unsigned long int x;
+       int x;
        int digit;
 
        if (gwarea->current[0] == '-') {
@@ -320,7 +320,7 @@ int getword_atolu(unsigned long int *number, struct getwordstruct *gwarea, char
                *number=(*number * 10) + digit;
        }
        if(gwarea->current[x] && gwarea->current[x]!=stop) {
-               debuga(_("End of number not found in %s after %ld bytes.\n"),__func__,x);
+               debuga(_("End of number not found in %s after %d bytes.\n"),__func__,x);
                debuga(_("Line=\"%s\"\n"),gwarea->beginning);
                debuga(_("Record=\"%s\"\n"),gwarea->current);
                debuga(_("searching for \'x%x\'\n"),stop);