X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Frbug%2Frbug_core.c;h=767dd38ee8689eb1b2c088bebf275eecc4601ff3;hb=f2f7064e560a83fc78d0e5b1d3a7d4aaac119a49;hp=876ae5a0ce63069354508184bd8b40d3de4a7ea3;hpb=73fc09a7bf5c63b595251dc10997891c72ecb119;p=mesa.git diff --git a/src/gallium/auxiliary/rbug/rbug_core.c b/src/gallium/auxiliary/rbug/rbug_core.c index 876ae5a0ce6..767dd38ee86 100644 --- a/src/gallium/auxiliary/rbug/rbug_core.c +++ b/src/gallium/auxiliary/rbug/rbug_core.c @@ -35,7 +35,7 @@ */ #include "rbug_internal.h" -#include "rbug/rbug_core.h" +#include "rbug_core.h" int rbug_send_noop(struct rbug_connection *__con, uint32_t *__serial) @@ -226,19 +226,13 @@ int rbug_send_error_reply(struct rbug_connection *__con, struct rbug_proto_noop * rbug_demarshal_noop(struct rbug_proto_header *header) { - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; struct rbug_proto_noop *ret; if (!header) return NULL; - if (header->opcode != (int16_t)RBUG_OP_NOOP) + if (header->opcode != (int32_t)RBUG_OP_NOOP) return NULL; - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; ret = MALLOC(sizeof(*ret)); if (!ret) return NULL; @@ -246,25 +240,18 @@ struct rbug_proto_noop * rbug_demarshal_noop(struct rbug_proto_header *header) ret->header.__message = header; ret->header.opcode = header->opcode; - return ret; } struct rbug_proto_ping * rbug_demarshal_ping(struct rbug_proto_header *header) { - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; struct rbug_proto_ping *ret; if (!header) return NULL; - if (header->opcode != (int16_t)RBUG_OP_PING) + if (header->opcode != (int32_t)RBUG_OP_PING) return NULL; - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; ret = MALLOC(sizeof(*ret)); if (!ret) return NULL; @@ -272,7 +259,6 @@ struct rbug_proto_ping * rbug_demarshal_ping(struct rbug_proto_header *header) ret->header.__message = header; ret->header.opcode = header->opcode; - return ret; } @@ -285,7 +271,7 @@ struct rbug_proto_error * rbug_demarshal_error(struct rbug_proto_header *header) if (!header) return NULL; - if (header->opcode != (int16_t)RBUG_OP_ERROR) + if (header->opcode != (int32_t)RBUG_OP_ERROR) return NULL; pos = 0; @@ -312,7 +298,7 @@ struct rbug_proto_ping_reply * rbug_demarshal_ping_reply(struct rbug_proto_heade if (!header) return NULL; - if (header->opcode != (int16_t)RBUG_OP_PING_REPLY) + if (header->opcode != (int32_t)RBUG_OP_PING_REPLY) return NULL; pos = 0; @@ -339,7 +325,7 @@ struct rbug_proto_error_reply * rbug_demarshal_error_reply(struct rbug_proto_hea if (!header) return NULL; - if (header->opcode != (int16_t)RBUG_OP_ERROR_REPLY) + if (header->opcode != (int32_t)RBUG_OP_ERROR_REPLY) return NULL; pos = 0;