Skip to Content.
Sympa Menu

freetds - RE: [freetds] some small patches...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] some small patches...
  • Date: Tue, 15 Apr 2003 16:47:09 +0100

> 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


agreed.

> -----Original Message-----
> From: Lowden, James K [SMTP:LowdenJK AT bernstein.com]
> Sent: 15 April 2003 16:37
> To: 'FreeTDS Development Group'
> Subject: RE: [freetds] some small patches...
>
> > 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.
>
> --jkl
>
>
> 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.
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page