lib: [procutils.c] improve robustness

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2011-06-20 13:58:41 +02:00
parent 58a111bdb2
commit 4ef2674615
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ int proc_next_tid(struct proc_tasks *tasks, pid_t *tid)
struct dirent *d;
char *end;
if (!tasks || !tid)
return -1;
*tid = 0;
errno = 0;