summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/input_v4l.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 17ff3c06f..60a6dbb23 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -1581,9 +1581,9 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) {
lprintf("Freeing allocated audio frames");
if (this->aud_frames) {
buf_element_t *cur_frame = this->aud_frames;
- buf_element_t *next_frame = NULL;
- while ((next_frame = cur_frame->next) != NULL) {
+ while (cur_frame != NULL) {
+ buf_element_t *next_frame = cur_frame->next;
#ifdef LOG
printf(".");
#endif
@@ -1606,9 +1606,9 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) {
lprintf("Freeing allocated video frames");
if (this->vid_frames) {
buf_element_t *cur_frame = this->vid_frames;
- buf_element_t *next_frame = NULL;
- while ((next_frame = cur_frame->next) != NULL) {
+ while (cur_frame != NULL) {
+ buf_element_t *next_frame = cur_frame->next;
#ifdef LOG
printf(".");
#endif