[freetds] some small patches...

Lowden, James K LowdenJK at bernstein.com
Tue Apr 15 11:36:49 EDT 2003

> From: Thompson, Bill D (London) [mailto:ThompBil at exchange.uk.ml.com]
> Sent: April 15, 2003 8:38 AM
Seems to me that _set_null_value should use sizeof().  

> _set_null_value(DBPROCESS * dbproc, BYTE * varaddr, int datatype, int
> maxlen)
> {
>     switch (datatype) {
>     case SYBINT8:
-         memset(varaddr, '\0', 8);
+         memset(varaddr, '\0', sizeof(TDS_INT8));
>         break;
> +    case SYBDATETIME:
> -        memset(varaddr, '\0', 8);
> +        memset(varaddr, '\0', sizeof(TDS_DATETIME));
> +        break;

would be more expressive.  


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above.  If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.

More information about the FreeTDS mailing list