extra: fix some error pointer handling
The truth is, I slightly don't remember what the bug is here. It had
to do with error pointers...
The thinking behind the basically_the_same() function was that if we
call a function with an unknown pointer and at the end then we know the
pointer is either valid or NULL, then have we learned anything? And the
answer that I thought initially was that "no, we haven't learned anything
worthwhile. Ignore those results and preserve the original state."
But it turns out that it could also be an error pointer. I knew that, of
course, when I originally wrote this code but I under estimated how
important that is.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>