aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-04-10 09:53:45 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-04-10 16:17:13 +0200
commit0b0dda7e4becaab1444cef22381a6b0e5b1bfdb0 (patch)
tree00f68ac7cc836baf714559af20f90c85860e19d9
parent9fae5ee932d9e0858f05e93379fb9f29d29beea2 (diff)
misc: Use a unsigned result for the sizeof sizes
Avoid comparing unsigned/signed values with the msgb. In practice our messages are way lower than this would would matter though.
-rw-r--r--src/sccp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sccp.c b/src/sccp.c
index e061d37..ecec9b3 100644
--- a/src/sccp.c
+++ b/src/sccp.c
@@ -238,8 +238,8 @@ int _sccp_parse_connection_request(struct msgb *msgb, struct sccp_parse_result *
int _sccp_parse_connection_released(struct msgb *msgb, struct sccp_parse_result *result)
{
- static int header_size = sizeof(struct sccp_connection_released);
- static int optional_offset = offsetof(struct sccp_connection_released, optional_start);
+ static size_t header_size = sizeof(struct sccp_connection_released);
+ static size_t optional_offset = offsetof(struct sccp_connection_released, optional_start);
struct sccp_optional_data optional_data;
struct sccp_connection_released *rls = (struct sccp_connection_released *) msgb->l2h;
@@ -346,7 +346,7 @@ int _sccp_parse_connection_confirm(struct msgb *msgb, struct sccp_parse_result *
int _sccp_parse_connection_release_complete(struct msgb *msgb, struct sccp_parse_result *result)
{
- static int header_size = sizeof(struct sccp_connection_release_complete);
+ static size_t header_size = sizeof(struct sccp_connection_release_complete);
struct sccp_connection_release_complete *cmpl;
@@ -366,8 +366,8 @@ int _sccp_parse_connection_release_complete(struct msgb *msgb, struct sccp_parse
int _sccp_parse_connection_dt1(struct msgb *msgb, struct sccp_parse_result *result)
{
- static int header_size = sizeof(struct sccp_data_form1);
- static int variable_offset = offsetof(struct sccp_data_form1, variable_start);
+ static size_t header_size = sizeof(struct sccp_data_form1);
+ static size_t variable_offset = offsetof(struct sccp_data_form1, variable_start);
struct sccp_data_form1 *dt1 = (struct sccp_data_form1 *)msgb->l2h;