<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-e1d/+/19054">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  tnt: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">change list ordering for list of interfaces / lines<br><br>By using llist_add_tail(), we add new elements at the end of the list,<br>rather than inserting at front.  Among other things, this has the added<br>benefit that when the VTY prints information on lines, they are printed<br>in numerically ascending orrder (0,1,2, ...) and not the reverse.<br><br>Change-Id: I07a6ba706f855a29b4e33b1a6b008e0d2f11b6f3<br>---<br>M src/intf_line.c<br>1 file changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/intf_line.c b/src/intf_line.c</span><br><span>index bc01559..c3466e0 100644</span><br><span>--- a/src/intf_line.c</span><br><span>+++ b/src/intf_line.c</span><br><span>@@ -54,11 +54,11 @@</span><br><span>  INIT_LLIST_HEAD(&intf->lines);</span><br><span> </span><br><span>    if (!llist_empty(&e1d->interfaces)) {</span><br><span style="color: hsl(0, 100%, 40%);">-            struct e1_intf *f = llist_first_entry(&e1d->interfaces, struct e1_intf, list);</span><br><span style="color: hsl(120, 100%, 40%);">+         struct e1_intf *f = llist_last_entry(&e1d->interfaces, struct e1_intf, list);</span><br><span>                 intf->id = f->id + 1;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   llist_add(&intf->list, &e1d->interfaces);</span><br><span style="color: hsl(120, 100%, 40%);">+       llist_add_tail(&intf->list, &e1d->interfaces);</span><br><span> </span><br><span>     return intf;</span><br><span> }</span><br><span>@@ -80,11 +80,11 @@</span><br><span>      INIT_LLIST_HEAD(&line->list);</span><br><span> </span><br><span>     if (!llist_empty(&intf->lines)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                struct e1_line *l = llist_first_entry(&intf->lines, struct e1_line, list);</span><br><span style="color: hsl(120, 100%, 40%);">+             struct e1_line *l = llist_last_entry(&intf->lines, struct e1_line, list);</span><br><span>             line->id = l->id + 1;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   llist_add(&line->list, &intf->lines);</span><br><span style="color: hsl(120, 100%, 40%);">+   llist_add_tail(&line->list, &intf->lines);</span><br><span> </span><br><span>         return line;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-e1d/+/19054">change 19054</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-e1d/+/19054"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-e1d </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I07a6ba706f855a29b4e33b1a6b008e0d2f11b6f3 </div>
<div style="display:none"> Gerrit-Change-Number: 19054 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Assignee: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>