projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cb9fb6
)
scandir returns -1 on error
author
Keith Packard
<keithp@keithp.com>
Mon, 18 May 2009 05:43:34 +0000
(22:43 -0700)
committer
Keith Packard
<keithp@keithp.com>
Mon, 18 May 2009 05:43:34 +0000
(22:43 -0700)
In which case, the namelist is invalid, so don't look at it, and don't free
it.
Signed-off-by: Keith Packard <keithp@keithp.com>
aoview/aoview_dev.c
patch
|
blob
|
history
diff --git
a/aoview/aoview_dev.c
b/aoview/aoview_dev.c
index a326ad73defab28cd0a040716e8806e05062743b..33f7f8ecde929b20b602ffa0f07e7b1a8fe966a1 100644
(file)
--- a/
aoview/aoview_dev.c
+++ b/
aoview/aoview_dev.c
@@
-91,7
+91,7
@@
usb_tty(char *sys)
dir_filter_tty,
alphasort);
free(endpoint_full);
- if (ntty) {
+ if (ntty
> 0
) {
tty = aoview_fullname("/dev", namelist[0]->d_name + 4);
free(namelist);
return tty;