diff toys/other/ifconfig.c @ 1211:40e0f7b09b77 draft

Fix two bugs reported by Ashwini Sharma.
author Rob Landley <rob@landley.net>
date Fri, 28 Feb 2014 23:04:57 -0600
parents 4f080cdb2f6e
children 1aa9b7f39e4a
line wrap: on
line diff
--- a/toys/other/ifconfig.c	Fri Feb 28 20:46:16 2014 -0600
+++ b/toys/other/ifconfig.c	Fri Feb 28 23:04:57 2014 -0600
@@ -395,7 +395,7 @@
 
       ptr = p = (char *)sock->sa_data;
       memset(sock, 0, sizeof(struct sockaddr));
-      if (!argv[1]) {
+      if (argv[1]) {
         if (!strcmp("ether", *++argv)) sock->sa_family = ARPHRD_ETHER;
         else if (!strcmp("infiniband", *argv)) {
           sock->sa_family = ARPHRD_INFINIBAND;