[pacman-dev,5/5] sortbydeps: rename vptr -> i

Message ID 20170415215707.22767-5-andrew.gregory.8@gmail.com
State Accepted, archived
Headers show
Series [pacman-dev,1/5] graph.h: replace hardcoded values with an enum | expand

Commit Message

Andrew Gregory April 15, 2017, 9:57 p.m. UTC
vptr is a simple list iterator, which are typically named i.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
---
 lib/libalpm/deps.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index f55d6074..96f91739 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -215,7 +215,7 @@  alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle,
 {
 	alpm_list_t *newtargs = NULL;
 	alpm_list_t *vertices = NULL;
-	alpm_list_t *vptr;
+	alpm_list_t *i;
 	alpm_graph_t *vertex;
 
 	if(targets == NULL) {
@@ -226,9 +226,9 @@  alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle,
 
 	vertices = dep_graph_init(handle, targets, ignore);
 
-	vptr = vertices;
+	i = vertices;
 	vertex = vertices->data;
-	while(vptr) {
+	while(i) {
 		/* mark that we touched the vertex */
 		vertex->state = ALPM_GRAPH_STATE_PROCESSING;
 		int switched_to_child = 0;
@@ -252,8 +252,8 @@  alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle,
 			vertex = vertex->parent;
 			if(!vertex) {
 				/* top level vertex reached, move to the next unprocessed vertex */
-				for( vptr = vptr->next; vptr; vptr = vptr->next) {
-					vertex = vptr->data;
+				for(i = i->next; i; i = i->next) {
+					vertex = i->data;
 					if(vertex->state == ALPM_GRAPH_STATE_UNPROCESSED) {
 						break;
 					}