shared: add str_printf()
asprintf() has the problem that it leaves *strp undefined when it
fails. Here is a simple wrapper that ensures NULL if asprintf() fails,
which is much more convenient to use.
This will be useful in future patches, where one needs to return error
messages from maybe failing functions, and more.
Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
parent
63fc73d1
No related branches found
No related tags found
Please register or sign in to comment