
25 Jul
2012
25 Jul
'12
8:33 p.m.
Hi Joe,
On Wed, Jul 25, 2012 at 3:29 AM, Joe Hershberger joe.hershberger@gmail.comwrote:
+#define put_vci(e, str) \
do { \
*e++ = 60; \
Please keep the comment on the magic number.
Sure.
*e++ = sizeof(str); \
Did you mean to change this from strlen() to sizeof()? These are not the same thing.
Good catch, will change it.
memcpy(e, str, sizeof(str)); \
e += sizeof(str); \
} while (0)
/*
Initialize BOOTP extension fields in the request.
*/ @@ -435,12 +443,10 @@ static int DhcpExtended(u8 *e, int message_type,
IPaddr_t ServerID,
printf("Invalid pxeuuid: %s\n", uuid); } }
+#endif
*e++ = 60; /* Vendor Class Identifier */
vci_strlen = strlen(CONFIG_BOOTP_VCI_STRING);
If you aren't using this anymore, then you should remove size_t vci_strlen; from the top of the file.
Will move it inside macro.
Regards, Ilya.