summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/shm_pci.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-10-22 11:33:20 +0000
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-10-22 11:33:20 +0000
commit727efbe0c5e61862a870c71a2857b28eece3d369 (patch)
tree881da180b8d801c38ba0fbad2fc9f387a70ec016 /src/ipcpd/normal/shm_pci.c
parent482c44232d4deda3f89a7d85fbad99c1c64e80ec (diff)
parent3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2 (diff)
downloadouroboros-727efbe0c5e61862a870c71a2857b28eece3d369.tar.gz
ouroboros-727efbe0c5e61862a870c71a2857b28eece3d369.zip
Merged in dstaesse/ouroboros/be-extra (pull request #268)
build: Comply with -Wextra compiler flag
Diffstat (limited to 'src/ipcpd/normal/shm_pci.c')
-rw-r--r--src/ipcpd/normal/shm_pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ipcpd/normal/shm_pci.c b/src/ipcpd/normal/shm_pci.c
index 3a16a2da..aa18fa38 100644
--- a/src/ipcpd/normal/shm_pci.c
+++ b/src/ipcpd/normal/shm_pci.c
@@ -39,13 +39,12 @@
#define TTL_SIZE 1
#define CHK_SIZE 4
-static int shm_pci_head_size(struct dt_const * dtc)
+static size_t shm_pci_head_size(struct dt_const * dtc)
{
- int len = 0;
+ size_t len = 0;
len = dtc->addr_size * 2 + dtc->cep_id_size * 2
- + dtc->pdu_length_size + dtc->seqno_size
- + QOS_ID_SIZE;
+ + dtc->pdu_length_size + dtc->seqno_size + QOS_ID_SIZE;
if (dtc->has_ttl)
len += TTL_SIZE;
@@ -53,7 +52,7 @@ static int shm_pci_head_size(struct dt_const * dtc)
return len;
}
-static int shm_pci_tail_size(struct dt_const * dtc)
+static size_t shm_pci_tail_size(struct dt_const * dtc)
{
return dtc->has_chk ? CHK_SIZE : 0;
}
@@ -162,10 +161,11 @@ struct pci * shm_pci_des(struct shm_du_buff * sdb)
int offset = 0;
struct dt_const * dtc;
- head = shm_du_buff_head(sdb);
- if (head == NULL)
+ if (sdb == NULL)
return NULL;
+ head = shm_du_buff_head(sdb);
+
dtc = ribmgr_dt_const();
if (dtc == NULL)
return NULL;
@@ -221,7 +221,7 @@ int shm_pci_shrink(struct shm_du_buff * sdb)
int shm_pci_dec_ttl(struct shm_du_buff * sdb)
{
struct dt_const * dtc;
- int offset = 0;
+ size_t offset = 0;
uint8_t * head;
uint8_t * tail;