summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bütow <pbuetow@mimecast.com>2018-03-30 10:25:20 +0100
committerPaul Bütow <pbuetow@mimecast.com>2018-03-30 10:25:20 +0100
commit9fb6366e55184c7c1d9b80661e50dd60089c74e0 (patch)
tree3353e6eef1c8baa818e1b76df4781002e3e9adee
parent712a25f115bf34dc73f81e5a4f1971b586fb524a (diff)
restyle
-rw-r--r--ioriot/src/capture/capture.c2
-rw-r--r--ioriot/src/datas/btree.c2
-rw-r--r--ioriot/src/generate/vsize.c4
-rw-r--r--ioriot/src/main.c2
-rw-r--r--ioriot/src/replay/replay.c2
-rw-r--r--ioriot/src/replay/rstats.c2
-rw-r--r--ioriot/src/utils/futils.c3
-rw-r--r--ioriot/src/utils/utils.c30
8 files changed, 24 insertions, 23 deletions
diff --git a/ioriot/src/capture/capture.c b/ioriot/src/capture/capture.c
index aaad6cb..5e8771d 100644
--- a/ioriot/src/capture/capture.c
+++ b/ioriot/src/capture/capture.c
@@ -77,7 +77,7 @@ status_e capture_run(options_s *opts)
Out("NOTICE: It is good practise first to stop all processes, then to ");
Out("start capturing, and then to start all processes again. The reason ");
Out("is that processes may have already open file handles. In that case ");
- Out("I/O Riot would be unable to replay these! This may be improved ");
+ Out("I/O Riot would be unable to replay these! This may be improved ");
Put("in a future release!");
Put("To abort capturing now send Ctrl+C, otherwise wait 1h");
Put("Capturing I/O via: '%s'", staprun_command);
diff --git a/ioriot/src/datas/btree.c b/ioriot/src/datas/btree.c
index a70c442..b09ea1c 100644
--- a/ioriot/src/datas/btree.c
+++ b/ioriot/src/datas/btree.c
@@ -115,7 +115,7 @@ void btreelem_destroy_r(btreelem_s* e)
{
if (e->left)
btreelem_destroy_r(e->left);
- if (e->right)
+ if (e->right)
btreelem_destroy_r(e->right);
free(e);
diff --git a/ioriot/src/generate/vsize.c b/ioriot/src/generate/vsize.c
index 4bf8433..b38f1bc 100644
--- a/ioriot/src/generate/vsize.c
+++ b/ioriot/src/generate/vsize.c
@@ -210,7 +210,7 @@ void vsize_ensure_data_range(vsize_s *v, btree_s **ranges, const long offset, co
} else { // if (*ranges != NULL)
btree_ensure_range_l(*ranges, offset, offset+bytes,
- IGNORE_FILE_HOLE_BYTES);
+ IGNORE_FILE_HOLE_BYTES);
}
}
@@ -219,7 +219,7 @@ void vsize_read(vsize_s *v, void *vfd, const char *path, const int bytes)
vfd_s *vfd_ = vfd;
if (v->write_ranges == NULL ||
- !btree_has_range_l(v->write_ranges, vfd_->offset, vfd_->offset+bytes)) {
+ !btree_has_range_l(v->write_ranges, vfd_->offset, vfd_->offset+bytes)) {
vsize_ensure_data_range(v, &v->read_ranges, vfd_->offset, bytes);
_Set_required(v);
_Set_file(v);
diff --git a/ioriot/src/main.c b/ioriot/src/main.c
index c987fe3..d2db700 100644
--- a/ioriot/src/main.c
+++ b/ioriot/src/main.c
@@ -232,7 +232,7 @@ int main(int argc, char **argv)
Cleanup(cleanup_run(opts));
} else if (opts->capture_file && !opts->replay_file) {
- // We are going to capture I/O
+ // We are going to capture I/O
Cleanup(capture_run(opts));
} else if (opts->capture_file && opts->replay_file) {
diff --git a/ioriot/src/replay/replay.c b/ioriot/src/replay/replay.c
index e4606d1..c7ea7e4 100644
--- a/ioriot/src/replay/replay.c
+++ b/ioriot/src/replay/replay.c
@@ -150,7 +150,7 @@ status_e replay_run(options_s *opts)
pid_t pid;
int rworker_status = SUCCESS;
- while ((pid = wait(&rworker_status)) > 0) {
+ while ((pid = wait(&rworker_status)) > 0) {
if (rworker_status != SUCCESS)
status = rworker_status;
diff --git a/ioriot/src/replay/rstats.c b/ioriot/src/replay/rstats.c
index c3e6e38..6def990 100644
--- a/ioriot/src/replay/rstats.c
+++ b/ioriot/src/replay/rstats.c
@@ -70,7 +70,7 @@ void rstats_stop(rstats_s* s)
{
gettimeofday(&s->end_time, NULL);
s->duration= ((s->end_time.tv_sec - s->start_time.tv_sec) * 1000
- + (s->end_time.tv_usec - s->start_time.tv_usec) / 1000) / 1000;
+ + (s->end_time.tv_usec - s->start_time.tv_usec) / 1000) / 1000;
}
diff --git a/ioriot/src/utils/futils.c b/ioriot/src/utils/futils.c
index ccaf3e4..366756a 100644
--- a/ioriot/src/utils/futils.c
+++ b/ioriot/src/utils/futils.c
@@ -21,7 +21,8 @@
#include "../macros.h"
-void _write_random_to_stream(FILE *fp, unsigned long bytes) {
+void _write_random_to_stream(FILE *fp, unsigned long bytes)
+{
char *buf = NULL;
int max_chunk = 50000000; // 50 mebibyetes
diff --git a/ioriot/src/utils/utils.c b/ioriot/src/utils/utils.c
index 1ab995d..ae3549f 100644
--- a/ioriot/src/utils/utils.c
+++ b/ioriot/src/utils/utils.c
@@ -90,12 +90,12 @@ void set_limits_drop_root(const char *user)
rl.rlim_cur = rl.rlim_max = SET_RLIMIT_NOFILE;
if (0 != setrlimit(RLIMIT_NOFILE, &rl)) {
Errno("Could not set RLIMIT_NOFILE to '%lld'!",
- (long long) SET_RLIMIT_NOFILE)
+ (long long) SET_RLIMIT_NOFILE)
}
rl.rlim_cur = rl.rlim_max = SET_RLIMIT_NPROC;
if (0 != setrlimit(RLIMIT_NPROC, &rl)) {
Errno("Could not set RLIMIT_NPROC to '%lld'!",
- (long long) SET_RLIMIT_NPROC)
+ (long long) SET_RLIMIT_NPROC)
}
if (!Eq("root", user)) {
@@ -155,19 +155,19 @@ void start_pthread(pthread_t *thread, void*(*cb)(void*), void *data)
int rc = pthread_create(thread, NULL, cb, data);
switch (rc) {
- case 0:
- break;
- case EAGAIN:
- Error("Out of resources while creating pthread (%d)", rc);
- break;
- case EINVAL:
- Error("Ivalid settings while creating pthread (%d)", rc);
- break;
- case EPERM:
- Error("No permissions to configure pthread (%d)", rc);
- default:
- Error("Unknown error while creating pthread (%d)", rc);
- break;
+ case 0:
+ break;
+ case EAGAIN:
+ Error("Out of resources while creating pthread (%d)", rc);
+ break;
+ case EINVAL:
+ Error("Ivalid settings while creating pthread (%d)", rc);
+ break;
+ case EPERM:
+ Error("No permissions to configure pthread (%d)", rc);
+ default:
+ Error("Unknown error while creating pthread (%d)", rc);
+ break;
}
}