roxen.lists.roxen.general

Subject Author Date
Re: [PATCH 02/17] Simplify logic, drop redundant code Stephen R. van den Berg <srb[at]cuci[dot]nl> 20-01-2009
Henrik Grubbstr?m wrote:
>On Tue, 20 Jan 2009, Stephen R. van den Berg wrote:
>>-		       if (x) return x;
>>-		       if ((x != 0) && stringp(x->type))
>>-			 return x->type;
>>-		       return RXML.nil;

>This patch is unsafe, since it changes the handling of "" for results from 
>Oracle (Oracle doesn't differentiate between "" and NULL for string fields).

The first if (x) return x; always catches if (x != 0), or am I missing
something subtle here?
I.e. it only gets to the Oracle "if" when x == 0.
If my simplification is unsafe for Oracle, then maybe the existing logic
needs to be fixed?
-- 
Sincerely,
           Stephen R. van den Berg.

"Please, somebody give him a blowjob so we can impeach him."