diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_dvb.c | 6 | ||||
-rw-r--r-- | src/input/pnm.c | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 121e11b11..669cd1e14 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -587,8 +587,7 @@ static tuner_t *tuner_init(xine_t * xine, int adapter) xprintf(this->xine, XINE_VERBOSITY_DEBUG, "tuner_init adapter=%d\n", adapter); this->fd_frontend = -1; - for (x = 0; x < MAX_FILTERS; x++) - this->fd_pidfilter[x] = 0; + memset(this->fd_pidfilter, 0, sizeof(this->fd_pidfilter)); this->xine = xine; this->adapter_num = adapter; @@ -933,8 +932,7 @@ static channel_t *load_channels(xine_t *xine, xine_stream_t *stream, int *num_ch /* Initially there's no EPG data in the EPG structs. */ channels[num_channels].epg_count = 0; - for (i = 0; i < MAX_EPG_ENTRIES_PER_CHANNEL; ++i) - channels[num_channels].epg[i] = NULL; + memset(channels[num_channels].epg, 0, sizeof(channels[num_channels].epg)); num_channels++; } diff --git a/src/input/pnm.c b/src/input/pnm.c index 47a24a620..5b8aa7c42 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -631,10 +631,7 @@ static int pnm_get_stream_chunk(pnm_t *p) { */ n=0; while (p->buffer[0] != 0x5a) { - int i; - for (i=1; i<8; i++) { - p->buffer[i-1]=p->buffer[i]; - } + memmove(p->buffer, &p->buffer[1], 8); _x_io_tcp_read (p->stream, p->s, &p->buffer[7], 1); n++; } |