Merge several fixes suggested by Joakim Tjernlund.

This commit is contained in:
Ondrej Zajicek 2010-05-02 22:41:40 +02:00
parent 6384c7d7aa
commit 506fa1a73e
5 changed files with 9 additions and 5 deletions

View file

@ -77,6 +77,9 @@ int (*cf_read_hook)(byte *buf, unsigned int max);
%} %}
%option noyywrap %option noyywrap
%option noinput
%option nounput
%option noreject
%x COMMENT CCOMM CLI %x COMMENT CCOMM CLI
@ -110,7 +113,7 @@ WHITE [ \t]
#endif #endif
} }
0x{DIGIT}+ { 0x{XIGIT}+ {
char *e; char *e;
long int l; long int l;
errno = 0; errno = 0;

View file

@ -1050,6 +1050,7 @@ static struct {
{ 2, 5, "Authentication failure" }, { 2, 5, "Authentication failure" },
{ 2, 6, "Unacceptable hold time" }, { 2, 6, "Unacceptable hold time" },
{ 2, 7, "Required capability missing" }, /* [RFC3392] */ { 2, 7, "Required capability missing" }, /* [RFC3392] */
{ 2, 8, "No supported AFI/SAFI" }, /* This error msg is nonstandard */
{ 3, 0, "Invalid UPDATE message" }, { 3, 0, "Invalid UPDATE message" },
{ 3, 1, "Malformed attribute list" }, { 3, 1, "Malformed attribute list" },
{ 3, 2, "Unrecognized well-known attribute" }, { 3, 2, "Unrecognized well-known attribute" },

View file

@ -240,7 +240,7 @@ lsasum_check(struct ospf_lsa_header *h, void *body)
c1 %= 255; c1 %= 255;
} }
x = ((length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255; x = (int)((length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255;
if (x <= 0) if (x <= 0)
x += 255; x += 255;
y = 510 - c0 - x; y = 510 - c0 - x;

View file

@ -13,8 +13,8 @@
#ifdef CPU_BIG_ENDIAN #ifdef CPU_BIG_ENDIAN
static inline void htonlsah(struct ospf_lsa_header *h, struct ospf_lsa_header *n) { *n = *h; }; 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 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 htonlsab(void *h, void *n, u16 len) { ASSERT(h != n); memcpy(n, h, len); };
static inline void ntohlsab(void *n, void *h, u16 len) { memcpy(h, n, 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 htonlsab1(void *h, u16 len) { };
static inline void ntohlsab1(void *n, u16 len) { }; static inline void ntohlsab1(void *n, u16 len) { };
#else #else

View file

@ -66,7 +66,7 @@ else
subdir: all.o subdir: all.o
all.o: $(objs) all.o: $(objs)
$(LD) -r -o $@ $^ $(CC) -nostdlib -Wl,-r -o $@ $^
endif endif