freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT schemamania.org>
- To: TDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] portable constructions
- Date: Tue, 31 Dec 2002 17:34:28 -0500
I often see code like this:
CS_VOID * buffer;
CS_INT int_val;
memcpy(buffer, &int_val, sizeof(CS_INT));
I wouldn't use memcpy(). I would cast it:
*(CS_INT*) buffer = int_val;
Is there some reason not to do that? Surely my code is easier to
understand and requires fewer instructions.
--jkl
-
[freetds] portable constructions,
James K. Lowden, 12/31/2002
- Re: [freetds] portable constructions, Michael Peppler, 12/31/2002
- Re: [freetds] portable constructions, Brian Bruns, 12/31/2002
Archive powered by MHonArc 2.6.24.