summaryrefslogtreecommitdiff
path: root/src/lib/du_buff.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@intec.ugent.be>2016-03-15 15:52:35 +0100
committerDimitri Staessens <dimitri.staessens@intec.ugent.be>2016-03-15 15:57:40 +0100
commit69fd7316e545bd94da2b066362ebf58dd945cbb3 (patch)
treea018834d6065d969530c2a7b653971b5b7699ba1 /src/lib/du_buff.c
parent04bf4380b30b58252d1d2aab75a9dcc5c084c831 (diff)
downloadouroboros-69fd7316e545bd94da2b066362ebf58dd945cbb3.tar.gz
ouroboros-69fd7316e545bd94da2b066362ebf58dd945cbb3.zip
lib: indentation fixes in du_buff
Diffstat (limited to 'src/lib/du_buff.c')
-rw-r--r--src/lib/du_buff.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/du_buff.c b/src/lib/du_buff.c
index 7e0f502e..a13e520d 100644
--- a/src/lib/du_buff.c
+++ b/src/lib/du_buff.c
@@ -80,8 +80,7 @@ struct buffer * buffer_create (size_t size, size_t headspace, size_t len)
size_t remaining = size;
size_t ts = size - (headspace + len);
- if (headspace > DU_BLOCK_DATA_SIZE || ts > DU_BLOCK_DATA_SIZE)
- {
+ if (headspace > DU_BLOCK_DATA_SIZE || ts > DU_BLOCK_DATA_SIZE) {
LOG_WARN("Illegal du_buff. Cannot fit PCI in DU_BUFF_BLOCK.");
return NULL;
}
@@ -104,11 +103,11 @@ struct buffer * buffer_create (size_t size, size_t headspace, size_t len)
&& remaining - ts <= DU_BLOCK_DATA_SIZE
&& remaining != ts) {
sz = remaining - ts;
- } else if (size > DU_BLOCK_DATA_SIZE && remaining == ts) {
+ } else if (size > DU_BLOCK_DATA_SIZE && remaining == ts) {
sz = ts;
} else {
- sz = remaining < DU_BLOCK_DATA_SIZE ?
- remaining : DU_BLOCK_DATA_SIZE;
+ sz = remaining < DU_BLOCK_DATA_SIZE ?
+ remaining : DU_BLOCK_DATA_SIZE;
}
buf = malloc(sizeof *buf);
@@ -249,7 +248,7 @@ int buffer_copy_data(struct buffer * head,
du_buff_t * du_buff_create(size_t size)
{
- du_buff_t * dub = (du_buff_t *)malloc(sizeof(du_buff_t));
+ du_buff_t * dub = malloc(sizeof *dub);
if (dub == NULL) {
LOG_DBGF("Bogus input, bugging out.");