lshal: strip ending \0 from cmdline

/proc/{pid}/cmdline contains trailing null characters,
and `lshal -m` prints them. These trailing null characters
are visible when the output is redirected to an output file
or to `less`. It also make the output less "greppable" because
grep thinks the output is in binary format.

Test: adb shell lshal -m | less
Test: adb shell lshal -m | grep system_server
Change-Id: I622cba887604e5f578daa7cedddd9cdfeb304069
1 file changed