[Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/mal tablet.mx, , 1.114, 1.115

Romulo Goncalves R.A.Goncalves at cwi.nl
Fri Feb 29 11:38:21 CET 2008


Niels Nes wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3888/src/modules/mal
> 
> Modified Files:
> 	tablet.mx 
> Log Message:
> correctly check for null values
> 
> 
> Index: tablet.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/tablet.mx,v
> retrieving revision 1.114
> retrieving revision 1.115
> diff -u -d -r1.114 -r1.115
> --- tablet.mx	18 Feb 2008 19:29:07 -0000	1.114
> +++ tablet.mx	18 Feb 2008 19:57:37 -0000	1.115
> @@ -1264,9 +1264,8 @@
>  		e = s;
>  	if ( s == NULL ||
>  	     (s == e && fmt->nullstr[0] == 0) ||
Would not be better here to do only fmt->nullstr
because if fmt->nullstr was initialized with NULL
this if clause will crash the mserver...

Romulo
> -	     (!quote && strcasecmp(s,fmt->nullstr) == 0) ||
> -	     (quote && strncasecmp(s+1, fmt->nullstr, e-s) == 0)
> -		) {
> +	     (s != e && !quote && strcasecmp(s,fmt->nullstr) == 0) ||
> +	     (s != e && quote && strncasecmp(s+1, fmt->nullstr, e-s) == 0)) {
>  		adt = fmt->data;
>  		memcpy(adt, ATOMnilptr(fmt->adt), fmt->nillen);
>  	} else {
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Monetdb-checkins mailing list
> Monetdb-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins





More information about the developers-list mailing list