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
4c8d927a
No related branches found
No related tags found
This commit is part of merge request !637. Comments created here will be created in the context of that merge request.
Please register or sign in to comment