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_types.c

    r821 r1765  
     1/* vi: set sw=4 ts=4: */
    12/*
    23 * ll_types.c
     
    910 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
    1011 */
    11 #include <stdio.h>
    1212#include <arpa/inet.h>
    13 
    1413#include <linux/if_arp.h>
    1514
     15#include "libbb.h"
    1616#include "rt_names.h"
    1717
    18 const char * ll_type_n2a(int type, char *buf, int len)
     18const char* ll_type_n2a(int type, char *buf, int len)
    1919{
    2020#define __PF(f,n) { ARPHRD_##f, #n },
    21 static struct {
     21static const struct {
    2222    int type;
    23     char *name;
     23    const char *name;
    2424} arphrd_names[] = {
    2525{ 0, "generic" },
     
    109109
    110110    int i;
    111     for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
     111    for (i = 0; i < ARRAY_SIZE(arphrd_names); i++) {
    112112         if (arphrd_names[i].type == type)
    113113            return arphrd_names[i].name;
Note: See TracChangeset for help on using the changeset viewer.