* \retval NTLM_ERR_PROTOCOL Packet is not the expected type.
*/
int
-ntlm_validate_packet(const ntlmhdr * hdr, const int type)
+ntlm_validate_packet(const ntlmhdr * hdr, const int32_t type)
{
/*
* Must be the correct security package and request type.
if (type == NTLM_ANY)
return NTLM_ERR_NONE;
- if (le32toh(hdr->type) != type) {
+ if ((int32_t)le32toh(hdr->type) != type) {
/* don't report this error - it's ok as we do a if() around this function */
// fprintf(stderr, "ntlmCheckHeader: type is %d, wanted %d\n", le32toh(hdr->type), type);
return NTLM_ERR_PROTOCOL;
} ntlmhdr;
/** Validate the packet type matches one we want. */
- int ntlm_validate_packet(const ntlmhdr *packet, const int type);
+ int ntlm_validate_packet(const ntlmhdr *packet, const int32_t type);
/** Retrieve a string from the NTLM packet payload. */
lstring ntlm_fetch_string(const ntlmhdr *packet,
*/
/* makes a null-terminated string upper-case. Changes CONTENTS! */
-static void
+inline void
uc(char *string)
{
char *p = string, c;
}
/* makes a null-terminated string lower-case. Changes CONTENTS! */
-static void
+inline void
lc(char *string)
{
char *p = string, c;
}
}
-static void
+inline void
hex_dump(unsigned char *data, int size)
{
/* dumps size bytes of *data to stdout. Looks like: