projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux
[firefly-linux-kernel-4.4.55.git]
/
tools
/
usb
/
usbip
/
src
/
usbip_detach.c
diff --git
a/tools/usb/usbip/src/usbip_detach.c
b/tools/usb/usbip/src/usbip_detach.c
index 05c6d15856eb649d1b1e46e685988ebb1accdb46..9db9d21bb2ecee75c89c027ccb07cfdeb21062de 100644
(file)
--- a/
tools/usb/usbip/src/usbip_detach.c
+++ b/
tools/usb/usbip/src/usbip_detach.c
@@
-47,7
+47,9
@@
static int detach_port(char *port)
uint8_t portnum;
char path[PATH_MAX+1];
- for (unsigned int i = 0; i < strlen(port); i++)
+ unsigned int port_len = strlen(port);
+
+ for (unsigned int i = 0; i < port_len; i++)
if (!isdigit(port[i])) {
err("invalid port %s", port);
return -1;