From: Frederic Marchal Date: Thu, 2 Apr 2015 19:16:14 +0000 (+0200) Subject: Use the same variable type in a message X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=337b9536e15c1a3610bc933a2daa2f5c40d4b0c0;p=thirdparty%2Fsarg.git Use the same variable type in a message 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. --- diff --git a/util.c b/util.c index fc9fece..095cf07 100644 --- 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);