PERFORCE change 153228 for review

Sam Leffler sam at FreeBSD.org
Wed Nov 19 11:04:13 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=153228

Change 153228 by sam at sam_ebb on 2008/11/19 19:03:14

	fix handling of sku codes like country codes; need to make a
	full pass over all atoi usage

Affected files ...

.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#33 edit

Differences ...

==== //depot/projects/vap/sbin/ifconfig/ifieee80211.c#33 (text+ko) ====

@@ -1957,8 +1957,12 @@
 
 	rd = lib80211_regdomain_findbyname(rdp, val);
 	if (rd == NULL) {
-		rd = lib80211_regdomain_findbysku(rdp, atoi(val));
-		if (rd == NULL)
+		char *eptr;
+		long sku = strtol(val, &eptr, 0);
+
+		if (eptr != val)
+			rd = lib80211_regdomain_findbysku(rdp, sku);
+		if (eptr == val || rd == NULL)
 			errx(1, "unknown regdomain %s", val);
 	}
 	getregdomain(s);


More information about the p4-projects mailing list