diff options
author | paul <paul> | 2004-07-09 12:24:42 +0000 |
---|---|---|
committer | paul <paul> | 2004-07-09 12:24:42 +0000 |
commit | ebfb245714bafe30f44e4b023a53982af1f81576 (patch) | |
tree | f332101c6236462edd71ad6a301efd0e59b46a0d /lib/if.c | |
parent | 71145091c0bd9b46e89efec7c80ca90b7fd8257d (diff) | |
download | quagga-ebfb245714bafe30f44e4b023a53982af1f81576.tar.bz2 quagga-ebfb245714bafe30f44e4b023a53982af1f81576.tar.xz |
2004-07-09 Juris Kalnins <juris@mt.lv>
* if.c: (if_cmp_func) fix for interface names where name is same,
but one has no number, eg "devtyp" and "devtyp0".
Diffstat (limited to 'lib/if.c')
-rw-r--r-- | lib/if.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -74,10 +74,14 @@ if_cmp_func (struct interface *ifp1, struct interface *ifp2) return res; /* with identical name part, go to numeric part */ - p1 += l1; p2 += l1; + if (!*p1) + return -1; + if (!*p2) + return 1; + x1 = strtol(p1, &p1, 10); x2 = strtol(p2, &p2, 10); |