Age | Commit message (Collapse) | Author |
|
|
|
|
|
On success, fgets always terminates the result.
|
|
If fgets succeeds, then the resulting char array is always
terminated by a '\0'. No need to keep extra space, therefore
sizeof(buf) is the correct argument.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
Fixed out of boundary write on long lines.
|
|
The terminating nul character ('\0') could be written outside the boundary of
the buffer which is used to read characters. If "sizeof(buffer)" characters
are read, the resulting value must not be used as index, because that's an off
by one.
Read sizeof(buffer)-1 bytes instead.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
refactor vol_perc to not depend on alsa libraries
|
|
|
|
|
|
|
|
|
|
|
|
several bugfixes and general improvements, see commits below.
|
|
|
|
|
|
|
|
|
|
|
|
opts can't be all called at the same time, that's why a separator is required
|
|
|
|
|
|
|
|
|
|
|
|
as a format string in snprintf()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newline after printing string stderr
|
|
|