From 22d7909903325df7cb5b2ee177d72d7ee7c1371d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 9 May 2008 18:16:37 +0200 Subject: Use size_t rather than int to store the return value of strlen(). Also, reduce visibility of the i variable to the loop where it is used. --- src/input/input_dvb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 669cd1e14..9166a80a6 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -884,7 +884,6 @@ static channel_t *load_channels(xine_t *xine, xine_stream_t *stream, int *num_ch channel_t *channels = NULL; int num_channels = 0; int num_alloc = 0; - int i; struct stat st; snprintf(filename, BUFSIZE, "%s/.xine/channels.conf", xine_get_homedir()); @@ -909,8 +908,8 @@ static channel_t *load_channels(xine_t *xine, xine_stream_t *stream, int *num_ch while ( fgets (str, BUFSIZE, f)) { channel_t channel = {0}; - /* lose trailing spaces & control characters */ - i = strlen (str); + /* lose trailing spaces & control characters */ + size_t i = strlen (str); while (i && str[i - 1] <= ' ') --i; if (i == 0) @@ -2816,7 +2815,7 @@ static int dvb_plugin_open(input_plugin_t * this_gen) * that the channels have really ugly names, sometimes prefixed * by numbers... */ - int chanlen = strlen(channame); + size_t chanlen = strlen(channame); int offset = 0; xprintf(this->class->xine, XINE_VERBOSITY_LOG, -- cgit v1.2.3