summaryrefslogtreecommitdiffstats
path: root/tools.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-04-12 20:57:41 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-04-12 20:57:41 +0200
commit445d5db0183cf5dc98a33160857f22f012cacea6 (patch)
tree24a86dc05195546cf888c104e604da9eb77b3309 /tools.c
parent39b33ce4be920b19a6b0f694febf8609ae64512b (diff)
downloadpcitool-445d5db0183cf5dc98a33160857f22f012cacea6.tar.gz
pcitool-445d5db0183cf5dc98a33160857f22f012cacea6.tar.bz2
pcitool-445d5db0183cf5dc98a33160857f22f012cacea6.tar.xz
pcitool-445d5db0183cf5dc98a33160857f22f012cacea6.zip
Prototype of IPECamera image protocol
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c4
1 files changed, 3 insertions, 1 deletions
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