luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.86k stars 537 forks source link

Uninitialized variable causing test failure #920

Closed jcaplan closed 1 year ago

jcaplan commented 1 year ago

https://github.com/luigirizzo/netmap/blob/b58a473becf02c03db4504bbd66987ef5b2fc3d8/utils/fd_server.c#L123-L125

Similar to the end of the function since we’re returning a successful result here then res->result=0 should be set. Or res should be initialized to 0 in handle_request. Otherwise if there happens to be non-zero data there then the test fails for no reason because functional gets a non-zero return code.