#define GO_NXT_ILV(ilv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_32BITS(&(ilv)->length)), \
(struct forces_ilv *)(((char*)(ilv)) \
+ F_ALN_LEN(EXTRACT_32BITS(&(ilv)->length))))
-#define INVALID_RLEN -1
-#define INVALID_STLN -2
-#define INVALID_LTLN -3
-#define INVALID_ALEN -4
+#define INVALID_RLEN 1
+#define INVALID_STLN 2
+#define INVALID_LTLN 3
+#define INVALID_ALEN 4
static const struct tok ForCES_TLV_err[] = {
{INVALID_RLEN, "Invalid total length"},
{0, NULL}
};
-static inline int tlv_valid(const struct forces_tlv *tlv, u_int rlen)
+static inline u_int tlv_valid(const struct forces_tlv *tlv, u_int rlen)
{
if (rlen < TLV_HDRL)
return INVALID_RLEN;
u_int32_t id;
char *ib = indent_pr(indent, 0);
u_int16_t type, tll;
- int invtlv;
+ u_int invtlv;
TCHECK(*tdp);
id = EXTRACT_32BITS(tdp);
u_int16_t tll;
int pad = 0;
u_int aln;
- int invtlv;
+ u_int invtlv;
TCHECK(*pdtlv);
type = EXTRACT_16BITS(&pdtlv->type);
const struct forces_tlv *pdtlv = (struct forces_tlv *)pptr;
u_int16_t type;
int tll;
- int invtlv;
+ u_int invtlv;
char *ib = indent_pr(indent, 0);
TCHECK(*pdtlv);
{
const struct forces_tlv *pdtlv = (struct forces_tlv *)pptr;
int tll;
- int invtlv;
+ u_int invtlv;
u_int16_t type;
register const u_char *dp;
char *ib;
const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
u_int dlen;
u_int rlen;
- int invtlv;
+ u_int invtlv;
/*
* forces_type_print() has ensured that len (the TLV length)
char *ib = indent_pr(indent, 0);
u_int dlen;
u_int rlen;
- int invtlv;
+ u_int invtlv;
/*
* forces_type_print() has ensured that len (the TLV length)
{
const struct forces_tlv *tltlv;
u_int rlen;
- int invtlv;
+ u_int invtlv;
int rc = 0;
int ttlv = 0;
{ 110, "volume busy" },
{ 111, "volume moved" },
{ 112, "AFS IO error" },
- { -100, "restarting fileserver" },
+ { 0xffffff9c, "restarting fileserver" }, /* -100, sic! */
{ 0, NULL }
};