Date: Wed, 19 Nov 2008 19:04:12 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 153228 for review Message-ID: <200811191904.mAJJ4Cas051754@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153228 Change 153228 by sam@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811191904.mAJJ4Cas051754>