diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-05-02 22:41:40 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-05-02 22:41:40 +0200 |
commit | 506fa1a73eab0c6426f68cd7784c6712898b88f3 (patch) | |
tree | 3c04d5900a70a026f98a0f20349fd33fde0e4162 /proto/ospf/lsalib.h | |
parent | 6384c7d7aa85d1e593eca30cda48f6677b023cb0 (diff) |
Merge several fixes suggested by Joakim Tjernlund.
Diffstat (limited to 'proto/ospf/lsalib.h')
-rw-r--r-- | proto/ospf/lsalib.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/ospf/lsalib.h b/proto/ospf/lsalib.h index f98a1bd3..8a949d86 100644 --- a/proto/ospf/lsalib.h +++ b/proto/ospf/lsalib.h @@ -13,8 +13,8 @@ #ifdef CPU_BIG_ENDIAN static inline void htonlsah(struct ospf_lsa_header *h, struct ospf_lsa_header *n) { *n = *h; }; static inline void ntohlsah(struct ospf_lsa_header *n, struct ospf_lsa_header *h) { *h = *n; }; -static inline void htonlsab(void *h, void *n, u16 len) { memcpy(n, h, len); }; -static inline void ntohlsab(void *n, void *h, u16 len) { memcpy(h, n, len); }; +static inline void htonlsab(void *h, void *n, u16 len) { ASSERT(h != n); memcpy(n, h, len); }; +static inline void ntohlsab(void *n, void *h, u16 len) { ASSERT(n != h); memcpy(h, n, len); }; static inline void htonlsab1(void *h, u16 len) { }; static inline void ntohlsab1(void *n, u16 len) { }; #else |