]> granicus.if.org Git - graphviz/commitdiff
RTreeLeafListFree: push definition of tlp closer to its use
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 24 Mar 2021 03:47:09 +0000 (20:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 31 Mar 2021 00:05:59 +0000 (17:05 -0700)
lib/label/index.c

index 43e631bf16eeabd0b6076d207c798569ed795f6f..d05cddc405296f4f316fa329baacc4330a9b5625 100644 (file)
@@ -39,9 +39,8 @@ LeafList_t *RTreeLeafListAdd(LeafList_t * llp, Leaf_t * lp)
 
 void RTreeLeafListFree(LeafList_t * llp)
 {
-    LeafList_t *tlp;
     while (llp->next) {
-       tlp = llp->next;
+       LeafList_t *tlp = llp->next;
        free(llp);
        llp = tlp;
     }