parlib: Fix "can't print 'ret'" bug
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 18 Aug 2017 20:21:44 +0000 (16:21 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 Aug 2017 20:14:49 +0000 (16:14 -0400)
commit26497335656fd20ba9cfa2d9585f7d5919d46ead
treedba84e471f738d3dcdf59f1cd1d615edbdc88f70
parentdb9f1bbd0a95cdcebbf8424122633eccb2ea17a2
parlib: Fix "can't print 'ret'" bug

Thanks to nasty macros, if you tried to do something like:

int ret = 3;
printf("Return value is %d\n", ret);

You'd get "Return value is 0".  The problem was that the 'ret' variable
inside the macro would be the one printed, not the one passed in.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/parlib/include/parlib/stdio.h