Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (17 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/networking/libiproute/ll_proto.c

    r821 r1765  
     1/* vi: set sw=4 ts=4: */
    12/*
    23 * ll_proto.c
     
    1112
    1213#include "libbb.h"
    13 #include <string.h>
    14 
    1514#include "rt_names.h"
    1615#include "utils.h"
    1716
    18 #if __GLIBC__ >=2 && __GLIBC_MINOR >= 1
     17#if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1
    1918#include <net/ethernet.h>
    2019#else
     
    2524static struct {
    2625    int id;
    27     char *name;
     26    const char *name;
    2827} llproto_names[] = {
    2928__PF(LOOP,loop)
     
    9897    id = ntohs(id);
    9998
    100     for (i=0; i<sizeof(llproto_names)/sizeof(llproto_names[0]); i++) {
     99    for (i=0; i < ARRAY_SIZE(llproto_names); i++) {
    101100         if (llproto_names[i].id == id)
    102101            return llproto_names[i].name;
     
    109108{
    110109    int i;
    111     for (i=0; i<sizeof(llproto_names)/sizeof(llproto_names[0]); i++) {
     110    for (i=0; i < ARRAY_SIZE(llproto_names); i++) {
    112111         if (strcasecmp(llproto_names[i].name, buf) == 0) {
    113112             *id = htons(llproto_names[i].id);
Note: See TracChangeset for help on using the changeset viewer.