From: Fabian Keil Date: Sun, 22 May 2011 10:20:05 +0000 (+0000) Subject: Change ssplit()'s fourth parameter from int to the proper size_t X-Git-Tag: v_3_0_18~230 X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/user-manual/static/gitweb.js?a=commitdiff_plain;h=a36a2c91c4b34c27041e725676f25888031c2571;p=privoxy.git Change ssplit()'s fourth parameter from int to the proper size_t As pointed out by clang, size_t's don't necessarily have the same width as int's and while I'm not aware of any actual issues caused by this (here), it doesn't hurt to use the right type anyway. --- diff --git a/ssplit.c b/ssplit.c index 7cfcb4dc..a4d9f2de 100644 --- a/ssplit.c +++ b/ssplit.c @@ -1,4 +1,4 @@ -const char ssplit_rcs[] = "$Id: ssplit.c,v 1.9 2007/11/03 14:35:45 fabiankeil Exp $"; +const char ssplit_rcs[] = "$Id: ssplit.c,v 1.10 2009/05/16 13:27:20 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/ssplit.c,v $ @@ -74,7 +74,7 @@ const char ssplit_h_rcs[] = SSPLIT_H_VERSION; * On error, vec and str may still have been overwritten. * *********************************************************************/ -int ssplit(char *str, const char *delim, char *vec[], int vec_len, +int ssplit(char *str, const char *delim, char *vec[], size_t vec_len, int dont_save_empty_fields, int ignore_leading) { unsigned char is_delim[256]; diff --git a/ssplit.h b/ssplit.h index efcde3f8..268d9730 100644 --- a/ssplit.h +++ b/ssplit.h @@ -1,6 +1,6 @@ #ifndef SSPLIT_H_INCLUDED #define SSPLIT_H_INCLUDED -#define SSPLIT_H_VERSION "$Id: ssplit.h,v 1.7 2006/07/18 14:48:47 david__schmidt Exp $" +#define SSPLIT_H_VERSION "$Id: ssplit.h,v 1.8 2009/05/16 13:27:20 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/ssplit.h,v $ @@ -39,7 +39,7 @@ extern "C" { #endif -extern int ssplit(char *str, const char *delim, char *vec[], int vec_len, +extern int ssplit(char *str, const char *delim, char *vec[], size_t vec_len, int dont_save_empty_fields, int ignore_leading); /* Revision control strings from this header and associated .c file */