[Spice-devel] [PATCH spice-streaming-agent 4/9] Improve the invalid option argument (-c) error message
Lukáš Hrázký
lhrazky at redhat.com
Thu Jun 14 09:59:39 UTC 2018
On Thu, 2018-06-14 at 05:41 -0400, Frediano Ziglio wrote:
> >
> > Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
> > ---
> > src/spice-streaming-agent.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
> > index ca10d3b..d5ed034 100644
> > --- a/src/spice-streaming-agent.cpp
> > +++ b/src/spice-streaming-agent.cpp
> > @@ -429,7 +429,7 @@ int main(int argc, char* argv[])
> > case 'c': {
> > char *p = strchr(optarg, '=');
> > if (p == NULL) {
> > - syslog(LOG_ERR, "wrong 'c' argument %s\n", optarg);
> > + syslog(LOG_ERR, "Invalid '-c' argument value: %s\n",
> > optarg);
> > usage(argv[0]);
> > }
> > *p++ = '\0';
>
> Why not removing also the not necessary line terminator (\n) ?
I didn't know it was unnecessary. Perhaps another commit taking care of
that in all the syslog() calls, there are plenty "\n" there?
> Otherwise,
> Acked-by: Frediano Ziglio <fziglio at redhat.com>
>
> Frediano
More information about the Spice-devel
mailing list