Module Name:    src
Committed By:   christos
Date:           Sun Jan 17 14:57:18 UTC 2016

Modified Files:
        src/sys/arch/i386/stand/lib/netif: 3c90xb.c etherdrv.h

Log Message:
PR/50668: David Binderman: Don't compare unsigned to -1


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/stand/lib/netif/3c90xb.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/lib/netif/etherdrv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/lib/netif/3c90xb.c
diff -u src/sys/arch/i386/stand/lib/netif/3c90xb.c:1.14 src/sys/arch/i386/stand/lib/netif/3c90xb.c:1.15
--- src/sys/arch/i386/stand/lib/netif/3c90xb.c:1.14	Sun Dec 14 13:46:33 2008
+++ src/sys/arch/i386/stand/lib/netif/3c90xb.c	Sun Jan 17 09:57:18 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: 3c90xb.c,v 1.14 2008/12/14 18:46:33 christos Exp $ */
+/* $NetBSD: 3c90xb.c,v 1.15 2016/01/17 14:57:18 christos Exp $ */
 
 /*
  * Copyright (c) 1999
@@ -291,7 +291,7 @@ ex_probemedia(void)
 	}
 	printf("unknown connector\n");
 bad:
-	ether_medium = -1;
+	ether_medium = ETHERMEDIUM_BAD;
 }
 
 int
@@ -346,7 +346,7 @@ found:
 		ether_medium = ETHERMEDIUM_MII;
 	else {
 		ex_probemedia();
-		if (ether_medium < 0)
+		if (ether_medium == ETHERMEDIUM_BAD)
 			return 0;
 	}
 

Index: src/sys/arch/i386/stand/lib/netif/etherdrv.h
diff -u src/sys/arch/i386/stand/lib/netif/etherdrv.h:1.9 src/sys/arch/i386/stand/lib/netif/etherdrv.h:1.10
--- src/sys/arch/i386/stand/lib/netif/etherdrv.h:1.9	Sun Dec 14 13:46:33 2008
+++ src/sys/arch/i386/stand/lib/netif/etherdrv.h	Sun Jan 17 09:57:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: etherdrv.h,v 1.9 2008/12/14 18:46:33 christos Exp $	*/
+/*	$NetBSD: etherdrv.h,v 1.10 2016/01/17 14:57:18 christos Exp $	*/
 
 /*
  * Copyright (c) 1996
@@ -32,6 +32,7 @@ int EtherReceive(char *, int);
 void EtherStop(void);
 
 extern unsigned ether_medium;
+#define ETHERMEDIUM_BAD ((unsigned)-1)
 #define ETHERMEDIUM_BNC 0
 #define ETHERMEDIUM_UTP 1
 #define ETHERMEDIUM_AUI 2

Reply via email to