From 445d5db0183cf5dc98a33160857f22f012cacea6 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 12 Apr 2011 20:57:41 +0200 Subject: Prototype of IPECamera image protocol --- tools.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools.c') diff --git a/tools.c b/tools.c index 21f7736..6076f18 100644 --- a/tools.c +++ b/tools.c @@ -196,7 +196,9 @@ void *pcilib_datacpy32(void * dst, void const * src, uint8_t size, size_t n, pci uint32_t * plDst = (uint32_t *) dst; uint32_t const * plSrc = (uint32_t const *) src; - int swap = (endianess == PCILIB_BIG_ENDIAN)?(ntohs(1)!=1):(ntohs(1)==1); + int swap = 0; + + if (endianess) swap = (endianess == PCILIB_BIG_ENDIAN)?(ntohs(1)!=1):(ntohs(1)==1); assert(size == 4); // only 32 bit at the moment -- cgit v1.2.3