Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115416038
D45463.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
699 B
Referenced Files
None
Subscribers
None
D45463.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D45463: Fix off-by-one bug in btpand
Attached
Detach File
Event Timeline
Log In to Comment