This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  d316e8e600df7b8b68f766c4d20529d586babe66 (commit)
      from  4defb42e2558e182c3b1f3aaacf2fe6dce0f6ac3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=d316e8e600df7b8b68f766c4d20529d586babe66


commit d316e8e600df7b8b68f766c4d20529d586babe66
Author: Giuseppe Scrivano <[email protected]>
Date:   Sat Jul 10 19:51:31 2010 +0200

    Remove unused function.

diff --git a/ChangeLog b/ChangeLog
index add60a6..ce8e96a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-10  Giuseppe Scrivano  <[email protected]>
+
+       * ifconfig/if_index.h (if_indextoname): Remove function declaration.
+
+       * ifconfig/if_index.c (if_indextoname): Remove unused function.
+
 2010-07-03  Giuseppe Scrivano  <[email protected]>
 
        * configure.ac: Do not check if `bcmp', `bcopy' and `bzero' exist.
diff --git a/ifconfig/if_index.c b/ifconfig/if_index.c
index 199904c..1080aca 100644
--- a/ifconfig/if_index.c
+++ b/ifconfig/if_index.c
@@ -208,51 +208,3 @@ if_nameindex (void)
   return NULL;
 #endif
 }
-
-char *
-if_indextoname (unsigned int ifindex, char *ifname)
-{
-#if defined SIOCGIFNAME
-  {
-    int fd = socket (AF_INET, SOCK_DGRAM, 0);
-    if (fd >= 0)
-      {
-       struct ifreq ifr;
-
-       ifr.ifr_index = ifindex;
-       if (ioctl (fd, SIOCGIFNAME, &ifr) == 0)
-         {
-           close (fd);
-           strncpy (ifname, ifr.ifr_name, IFNAMSIZ);
-           ifname[IFNAMSIZ - 1] = '\0';
-           return ifname;
-         }
-       close (fd);
-      }
-  }
-#else
-  {
-    struct if_nameindex *idx;
-    char *result = NULL;
-
-    idx = if_nameindex ();
-
-    if (idx != NULL)
-      {
-       struct if_nameindex *p;
-       for (p = idx; p->if_index || p->if_name; ++p)
-         {
-           if (p->if_index == ifindex)
-             {
-               result = strncpy (ifname, p->if_name, IFNAMSIZ);
-               result[IFNAMSIZ - 1] = '\0';
-               break;
-             }
-         }
-       if_freenameindex (idx);
-      }
-    return result;
-  }
-#endif
-  return NULL;
-}
diff --git a/ifconfig/if_index.h b/ifconfig/if_index.h
index 7b9ade6..31e10df 100644
--- a/ifconfig/if_index.h
+++ b/ifconfig/if_index.h
@@ -27,7 +27,6 @@ struct if_nameindex
   int if_index;
 };
 extern unsigned int if_nametoindex (const char *ifname);
-extern char *if_indextoname (unsigned int ifindex, char *ifname);
 extern struct if_nameindex *if_nameindex (void);
 extern void if_freenameindex (struct if_nameindex *ptr);
 # endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |    6 ++++++
 ifconfig/if_index.c |   48 ------------------------------------------------
 ifconfig/if_index.h |    1 -
 3 files changed, 6 insertions(+), 49 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 

_______________________________________________
Commit-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-inetutils

Reply via email to