[SSSD] [PATCH 2/2] tools: append new line to error string from poptStrerror()

Milan Cejnar milancejnar at gmail.com
Mon Feb 18 14:03:27 UTC 2013


Function usage() in tools_util.c now correctly appends new line character
with popt error messages.

https://fedorahosted.org/sssd/ticket/1756

This patch changes function usage() in tools_util.c which is used by
BAD_POPT_PARAMS macro.
Since BAD_POPT_PARAMS macro is called by multiple functions in multiple
files with both custom messages termited with \n as well as popt messages
which are not terminated by default, this patch offers a correction by
checking the string just before printing out to console and printing out
additional \n if new line wasn't present.

-----------

The second patch
- includes previously omitted brackets after if condition
- uses only one fprint()f call instead of two
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130218/ad3148bd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Patch-for-bug-1756-Append-new-line-to-string-from-po.patch
Type: application/octet-stream
Size: 1591 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130218/ad3148bd/attachment.obj>


More information about the sssd-devel mailing list