On 4 June 2013 21:23, Alon Levy <al...@redhat.com> wrote: > Found by Coverity. > > Signed-off-by: Alon Levy <al...@redhat.com> > --- > libcacard/vscclient.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c > index 5180d29..4275c23 100644 > --- a/libcacard/vscclient.c > +++ b/libcacard/vscclient.c > @@ -645,7 +645,7 @@ main( > GIOChannel *channel_stdin; > char *qemu_host; > char *qemu_port; > - VSCMsgHeader mhHeader; > + VSCMsgHeader mhHeader = {0,};
As far as I can see we only use this variable once: send_msg(VSC_Init, mhHeader.reader_id, &init, sizeof(init)); so wouldn't it be better just to directly pass a constant "0" to the send_msg() call? Hiding a single uint32_t in a struct seems a bit obscure. thanks -- PMM