diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-04-12 20:57:41 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-04-12 20:57:41 +0200 |
commit | 445d5db0183cf5dc98a33160857f22f012cacea6 (patch) | |
tree | 24a86dc05195546cf888c104e604da9eb77b3309 /tools.c | |
parent | 39b33ce4be920b19a6b0f694febf8609ae64512b (diff) | |
download | pcitool-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |