[2/5] epoll: Eliminate potential variable shadowing

Submitted by Cyrill Gorcunov on Dec. 7, 2018, 11:30 a.m.

Details

Message ID 20181207113043.21992-3-gorcunov@gmail.com
State New
Series "epoll: Add support of migrated targses"
Headers show

Commit Message

Cyrill Gorcunov Dec. 7, 2018, 11:30 a.m.
The variable t is used in two contexts and compiler
is smart enough to allocate separate space for each,
still better be on safe size and use different names.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/eventpoll.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/eventpoll.c b/criu/eventpoll.c
index e1384fa4b116..40ecd398e89a 100644
--- a/criu/eventpoll.c
+++ b/criu/eventpoll.c
@@ -124,10 +124,10 @@  static void dequeue_dinfo(struct eventpoll_dinfo *dinfo)
 
 int flush_eventpoll_dinfo_queue(void)
 {
-	struct eventpoll_dinfo *dinfo, *t;
+	struct eventpoll_dinfo *dinfo, *tmp;
 	ssize_t i;
 
-	list_for_each_entry_safe(dinfo, t, &dinfo_list, list) {
+	list_for_each_entry_safe(dinfo, tmp, &dinfo_list, list) {
 		EventpollFileEntry *e = dinfo->e;
 
 		for (i = 0; i < e->n_tfd; i++) {
@@ -177,7 +177,7 @@  int flush_eventpoll_dinfo_queue(void)
 	return 0;
 
 err:
-	list_for_each_entry_safe(dinfo, t, &dinfo_list, list)
+	list_for_each_entry_safe(dinfo, tmp, &dinfo_list, list)
 		dequeue_dinfo(dinfo);
 
 	return -1;