diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-09 18:16:37 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-09 18:16:37 +0200 |
commit | 22d7909903325df7cb5b2ee177d72d7ee7c1371d (patch) | |
tree | 6a9a9b268f6d71550229ee2b696e5621b4ba3800 /src | |
parent | 706317bb88fef28abbcb875a266608e44e56048c (diff) | |
download | xine-lib-22d7909903325df7cb5b2ee177d72d7ee7c1371d.tar.gz xine-lib-22d7909903325df7cb5b2ee177d72d7ee7c1371d.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_dvb.c | 7 |
1 files changed, 3 insertions, 4 deletions
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, |