From d02ae8445fab313783331951ded4038b445041a7 Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Thu, 19 Jul 2012 13:34:01 +0200 Subject: [PATCH] Prefer 'for (;;)' to 'while (1)' --- linkedlist/linkedlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkedlist/linkedlist.c b/linkedlist/linkedlist.c index 780c9ad..9b39e08 100644 --- a/linkedlist/linkedlist.c +++ b/linkedlist/linkedlist.c @@ -95,7 +95,7 @@ int linked_list_insert(struct linked_list *list, struct linked_list_node *item) ; */ - while (1) { + for (;;) { if (n==NULL) break; last = n; @@ -124,7 +124,7 @@ struct linked_list_node* linked_list_pop(struct linked_list* l) ; */ - while (1) { + for (;;) { if (n->next) n = n->next; else -- 2.38.5