core: accept NULL consumer strings
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 12 Jul 2017 17:46:50 +0000 (19:46 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 12 Jul 2017 18:07:00 +0000 (20:07 +0200)
commitd108954f39537254edbb9b3922d8eead9b5a6ee9
treee41e38533b18711b792aee7a2ace96aa1c3c6fe4
parent59bfd579eb5fcb0f4cc0f4c9a4feeb1fb3fad76c
core: accept NULL consumer strings

If the user passes a NULL pointer as the consumer name to any of the
line request functions, pass an empty string to the kernel instead of
segfaulting. The kernel code will then set the consumer string to "?".

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/lib/core.c
tests/tests-line.c