From: Frederic Marchal Date: Thu, 5 Nov 2015 20:01:39 +0000 (+0100) Subject: Fix the static and const correctness of a function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51f6da273beef37080bc9e6940aa5451fdae7664;p=thirdparty%2Fsarg.git Fix the static and const correctness of a function I happened to stumble on that function that was unnecessarily declared as global and without using const strings for strings that are not modified. That's just a style problem. --- diff --git a/datafile.c b/datafile.c index 3582206..bb11b0e 100644 --- a/datafile.c +++ b/datafile.c @@ -27,7 +27,7 @@ #include "include/conf.h" #include "include/defs.h" -void saverecs(FILE *fp_ou, const struct userinfostruct *uinfo, long long int nacc, char *url, long long int nbytes, char *ip, char *hora, char *dia, long long int nelap, long long int incache, long long int oucache); +static void saverecs(FILE *fp_ou, const struct userinfostruct *uinfo, long long int nacc, const char *url, long long int nbytes, const char *ip, const char *hora, const char *dia, long long int nelap, long long int incache, long long int oucache); void data_file(char *tmp) { @@ -210,7 +210,7 @@ void data_file(char *tmp) debuga(__FILE__,__LINE__,_("Datafile %s written successfully\n"),DataFile); } -void saverecs(FILE *fp_ou, const struct userinfostruct *uinfo, long long int nacc, char *url, long long int nbytes, char *ip, char *hora, char *dia, long long int nelap, long long int incache, long long int oucache) +static void saverecs(FILE *fp_ou, const struct userinfostruct *uinfo, long long int nacc, const char *url, long long int nbytes, const char *ip, const char *hora, const char *dia, long long int nelap, long long int incache, long long int oucache) { char val[20]; char name[512];