]> git.tuebingen.mpg.de Git - paraslash.git/commit
audiod: Avoid reading garbage in get_time_string().
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 20:35:37 +0000 (22:35 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 20:58:10 +0000 (22:58 +0200)
commit7f361b9877e7448d509e8b2d0220c8e0e0c6bcb1
tree149c4a596f130d73bad8601cbb860bc778186896
parent63128eead92c4e07559b222e2d3d0999be8c82ff
audiod: Avoid reading garbage in get_time_string().

If no writer is active, wstime is not initialized. Yet we check
whether wstime.tv_sec == 0.

Introduce a helper variable to avoid reading garbage. This also
improves readability.

Found by the clang static analyzer.
audiod.c