example/subsystem_netconf.c: Fix uninitialized variable bug

This commit is contained in:
Peter Stuge 2011-07-17 07:18:39 +02:00
parent 4ae907cdef
commit 7e47bd6640

View File

@ -228,7 +228,8 @@ int main(int argc, char *argv[])
goto shutdown;
printf("Reading NETCONF server <hello>\n");
if (-1 == netconf_read_until(channel, "</hello>", buf, sizeof(buf)))
len = netconf_read_until(channel, "</hello>", buf, sizeof(buf));
if (-1 == len)
goto shutdown;
printf("Got %d bytes:\n----------------------\n%s", len, buf);