Page MenuHomeFreeBSD

D45463.diff
No OneTemporary

D45463.diff

diff --git a/usr.sbin/bluetooth/btpand/btpand.c b/usr.sbin/bluetooth/btpand/btpand.c
--- a/usr.sbin/bluetooth/btpand/btpand.c
+++ b/usr.sbin/bluetooth/btpand/btpand.c
@@ -143,11 +143,14 @@
case 's': /* service */
case 'S': /* service (no SDP) */
- for (ul = 0; strcasecmp(optarg, services[ul].name); ul++) {
- if (ul == __arraycount(services))
- errx(EXIT_FAILURE, "%s: unknown service", optarg);
+ for (ul = 0; ul < __arraycount(services); ul++) {
+ if (strcasecmp(optarg, services[ul].name) == 0)
+ break;
}
+ if (ul == __arraycount(services))
+ errx(EXIT_FAILURE, "%s: unknown service", optarg);
+
if (ch == 's')
service_name = services[ul].name;

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 24, 2:11 PM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17760365
Default Alt Text
D45463.diff (699 B)

Event Timeline