projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosdroid: Auto tab changing
[fw/altos]
/
libaltos
/
libaltos.c
diff --git
a/libaltos/libaltos.c
b/libaltos/libaltos.c
index 505b3147f0f286527f0f743479a61230d2a7cf3e..ca56746a643d8cd0de773ceb180e0c2ea95320b3 100644
(file)
--- a/
libaltos/libaltos.c
+++ b/
libaltos/libaltos.c
@@
-478,26
+478,26
@@
usb_tty(char *sys)
return tty;
}
return tty;
}
- /* Check for ttyACMx style names
+ /* Check for tty
/tty
ACMx style names
*/
*/
- ntty = scandir(endpoint_full, &namelist,
+ tty_dir = cc_fullname(endpoint_full, "tty");
+ ntty = scandir(tty_dir, &namelist,
dir_filter_tty,
alphasort);
dir_filter_tty,
alphasort);
+ free (tty_dir);
if (ntty > 0) {
if (ntty > 0) {
- free(endpoint_full);
tty = cc_fullname("/dev", namelist[0]->d_name);
tty = cc_fullname("/dev", namelist[0]->d_name);
+ free(endpoint_full);
free(namelist);
return tty;
}
free(namelist);
return tty;
}
- /* Check for tty
/tty
ACMx style names
+ /* Check for ttyACMx style names
*/
*/
- tty_dir = cc_fullname(endpoint_full, "tty");
- free(endpoint_full);
- ntty = scandir(tty_dir, &namelist,
+ ntty = scandir(endpoint_full, &namelist,
dir_filter_tty,
alphasort);
dir_filter_tty,
alphasort);
- free
(tty_dir
);
+ free
(endpoint_full
);
if (ntty > 0) {
tty = cc_fullname("/dev", namelist[0]->d_name);
free(namelist);
if (ntty > 0) {
tty = cc_fullname("/dev", namelist[0]->d_name);
free(namelist);