White space spring cleaning
Lets squash them all, with a bit of tooling help.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/backend.c b/backend.c
index 1f5f3c7..319bd25 100644
--- a/backend.c
+++ b/backend.c
@@ -335,8 +335,8 @@
return 1;
if (td_non_fatal_error(err)) {
- /*
- * Continue with the I/Os in case of
+ /*
+ * Continue with the I/Os in case of
* a non fatal error.
*/
update_error_count(td, err);
@@ -1091,9 +1091,9 @@
memcpy(&td->tv_cache, &td->start, sizeof(td->start));
if (td->o.ratemin[0] || td->o.ratemin[1]) {
- memcpy(&td->lastrate[0], &td->bw_sample_time,
+ memcpy(&td->lastrate[0], &td->bw_sample_time,
sizeof(td->bw_sample_time));
- memcpy(&td->lastrate[1], &td->bw_sample_time,
+ memcpy(&td->lastrate[1], &td->bw_sample_time,
sizeof(td->bw_sample_time));
}
diff --git a/cairo_text_helpers.c b/cairo_text_helpers.c
index 89b9aa2..4ab3ac9 100644
--- a/cairo_text_helpers.c
+++ b/cairo_text_helpers.c
@@ -12,7 +12,7 @@
double factor, direction;
cairo_text_extents_t extents;
- switch(alignment) {
+ switch (alignment) {
case CENTERED:
direction = -1.0;
factor = 0.5;
@@ -58,7 +58,7 @@
draw_aligned_text(cr, font, x, y, fontsize, text, LEFT_JUSTIFIED);
}
-void draw_vertical_centered_text(cairo_t *cr, const char * font, double x,
+void draw_vertical_centered_text(cairo_t *cr, const char *font, double x,
double y, double fontsize,
const char *text)
{
diff --git a/cairo_text_helpers.h b/cairo_text_helpers.h
index f8157d4..014001a 100644
--- a/cairo_text_helpers.h
+++ b/cairo_text_helpers.h
@@ -12,7 +12,7 @@
double x, double y,
double fontsize, const char *text);
-void draw_vertical_centered_text(cairo_t *cr, const char * font, double x,
+void draw_vertical_centered_text(cairo_t *cr, const char *font, double x,
double y, double fontsize,
const char *text);
#endif
diff --git a/cconv.c b/cconv.c
index 14ee9c5..502cf82 100644
--- a/cconv.c
+++ b/cconv.c
@@ -191,8 +191,8 @@
for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++)
o->percentile_list[i].u.f = fio_uint64_to_double(le64_to_cpu(top->percentile_list[i].u.i));
#if 0
- uint8_t cpumask[FIO_TOP_STR_MAX];
- uint8_t verify_cpumask[FIO_TOP_STR_MAX];
+ uint8_t cpumask[FIO_TOP_STR_MAX];
+ uint8_t verify_cpumask[FIO_TOP_STR_MAX];
#endif
}
@@ -370,8 +370,8 @@
for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++)
top->percentile_list[i].u.i = __cpu_to_le64(fio_double_to_uint64(o->percentile_list[i].u.f));
#if 0
- uint8_t cpumask[FIO_TOP_STR_MAX];
- uint8_t verify_cpumask[FIO_TOP_STR_MAX];
+ uint8_t cpumask[FIO_TOP_STR_MAX];
+ uint8_t verify_cpumask[FIO_TOP_STR_MAX];
#endif
}
diff --git a/client.c b/client.c
index ed8f51e..d1357cb 100644
--- a/client.c
+++ b/client.c
@@ -472,7 +472,7 @@
#ifdef WIN32
WSADATA wsd;
- WSAStartup(MAKEWORD(2,2), &wsd);
+ WSAStartup(MAKEWORD(2, 2), &wsd);
#endif
dprint(FD_NET, "client: connect all\n");
diff --git a/filesetup.c b/filesetup.c
index f3d3829..166ace8 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -94,9 +94,9 @@
r = fallocate(f->fd, FALLOC_FL_KEEP_SIZE, 0,
f->real_file_size);
- if (r != 0) {
+ if (r != 0)
td_verror(td, errno, "fallocate");
- }
+
break;
#endif /* FIO_HAVE_LINUX_FALLOCATE */
default:
diff --git a/gclient.c b/gclient.c
index 1042eaf..d551351 100644
--- a/gclient.c
+++ b/gclient.c
@@ -426,7 +426,7 @@
sprintf(dst, " - %s", eta_str);
}
-
+
gfio_update_thread_status(ge, output, perc);
gdk_threads_leave();
}
@@ -514,7 +514,7 @@
sprintf(dst, " - %s", eta_str);
}
-
+
gfio_update_thread_status_all(ui, output, perc);
gdk_threads_leave();
}
@@ -963,7 +963,7 @@
*/
if (start == -1U)
return;
-
+
tree_view = gfio_output_lat_buckets(&io_u_lat[start], &ranges[start], end - start + 1);
ge->lat_bucket_graph = setup_lat_bucket_graph("Latency Buckets", &io_u_lat[start], &ranges[start], end - start + 1, 700.0, 300.0);
@@ -980,7 +980,7 @@
gtk_widget_modify_bg(drawing_area, GTK_STATE_NORMAL, &gfio_color_white);
gtk_container_add(GTK_CONTAINER(completion_vbox), drawing_area);
g_signal_connect(G_OBJECT(drawing_area), GFIO_DRAW_EVENT, G_CALLBACK(on_expose_lat_drawing_area), ge->lat_bucket_graph);
- g_signal_connect(G_OBJECT(drawing_area), "configure_event", G_CALLBACK(on_config_lat_drawing_area), ge->lat_bucket_graph);
+ g_signal_connect(G_OBJECT(drawing_area), "configure_event", G_CALLBACK(on_config_lat_drawing_area), ge->lat_bucket_graph);
gtk_box_pack_start(GTK_BOX(hbox), tree_view, TRUE, TRUE, 3);
}
diff --git a/gcompat.h b/gcompat.h
index 8b8461a..e0f7444 100644
--- a/gcompat.h
+++ b/gcompat.h
@@ -12,7 +12,7 @@
void gtk_combo_box_text_insert_text(GtkComboBoxText *combo_box, gint position, const gchar *text);
void gtk_combo_box_text_prepend_text(GtkComboBoxText *combo_box, const gchar *text);
void gtk_combo_box_text_remove(GtkComboBoxText *combo_box, gint position);
-gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
+gchar *gtk_combo_box_text_get_active_text(GtkComboBoxText *combo_box);
#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
#endif /* GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 24 */
diff --git a/gerror.c b/gerror.c
index 98b51a8..3036738 100644
--- a/gerror.c
+++ b/gerror.c
@@ -9,7 +9,7 @@
#include "gerror.h"
static void on_info_bar_response(GtkWidget *widget, gint response,
- gpointer data)
+ gpointer data)
{
struct gui *ui = (struct gui *) data;
@@ -25,16 +25,15 @@
if (ui->error_info_bar == NULL) {
ui->error_info_bar = gtk_info_bar_new_with_buttons(GTK_STOCK_OK,
- GTK_RESPONSE_OK,
- NULL);
+ GTK_RESPONSE_OK, NULL);
g_signal_connect(ui->error_info_bar, "response", G_CALLBACK(on_info_bar_response), ui);
gtk_info_bar_set_message_type(GTK_INFO_BAR(ui->error_info_bar),
- GTK_MESSAGE_ERROR);
-
+ GTK_MESSAGE_ERROR);
+
ui->error_label = gtk_label_new(error->message);
GtkWidget *container = gtk_info_bar_get_content_area(GTK_INFO_BAR(ui->error_info_bar));
gtk_container_add(GTK_CONTAINER(container), ui->error_label);
-
+
gtk_box_pack_start(GTK_BOX(ui->vbox), ui->error_info_bar, FALSE, FALSE, 0);
gtk_widget_show_all(ui->vbox);
} else {
diff --git a/gfio.c b/gfio.c
index 6b6d2b8..d80e41e 100644
--- a/gfio.c
+++ b/gfio.c
@@ -1,7 +1,7 @@
/*
* gfio - gui front end for fio - the flexible io tester
*
- * Copyright (C) 2012 Stephen M. Cameron <stephenmcameron@gmail.com>
+ * Copyright (C) 2012 Stephen M. Cameron <stephenmcameron@gmail.com>
* Copyright (C) 2012 Jens Axboe <axboe@kernel.dk>
*
* The license below covers all files distributed with fio unless otherwise
@@ -406,11 +406,11 @@
static void gfio_quit(struct gui *ui)
{
- gtk_main_quit();
+ gtk_main_quit();
}
static void quit_clicked(__attribute__((unused)) GtkWidget *widget,
- __attribute__((unused)) gpointer data)
+ gpointer data)
{
struct gui *ui = (struct gui *) data;
@@ -471,7 +471,7 @@
}
static void start_job_clicked(__attribute__((unused)) GtkWidget *widget,
- gpointer data)
+ gpointer data)
{
struct gui_entry *ge = data;
struct gfio_client *gc = ge->client;
@@ -876,7 +876,7 @@
if (get_connection_details(ge)) {
if (ge_is_new)
gtk_widget_destroy(ge->vbox);
-
+
return 1;
}
@@ -1016,7 +1016,7 @@
{
struct gui *ui = (struct gui *) data;
struct gui_entry *ge;
-
+
ge = get_ge_from_cur_tab(ui);
if (ge)
connect_clicked(w, ge);
@@ -1420,7 +1420,7 @@
setup_graphs(&ge->graphs);
/*
- * Set up alignments for widgets at the bottom of ui,
+ * Set up alignments for widgets at the bottom of ui,
* align bottom left, expand horizontally but not vertically
*/
bottom_align = gtk_alignment_new(0, 1, 1, 0);
@@ -1507,7 +1507,7 @@
setup_graphs(&ui->graphs);
/*
- * Set up alignments for widgets at the bottom of ui,
+ * Set up alignments for widgets at the bottom of ui,
* align bottom left, expand horizontally but not vertically
*/
bottom_align = gtk_alignment_new(0, 1, 1, 0);
@@ -1670,7 +1670,7 @@
gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting");
g_type_init();
gdk_color_parse("white", &gfio_color_white);
-
+
ui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(ui->window), "fio");
gtk_window_set_default_size(GTK_WINDOW(ui->window), 1024, 768);
diff --git a/graph.c b/graph.c
index ba013da..81b1524 100644
--- a/graph.c
+++ b/graph.c
@@ -1,7 +1,7 @@
/*
* gfio - gui front end for fio - the flexible io tester
*
- * Copyright (C) 2012 Stephen M. Cameron <stephenmcameron@gmail.com>
+ * Copyright (C) 2012 Stephen M. Cameron <stephenmcameron@gmail.com>
*
* The license below covers all files distributed with fio unless otherwise
* noted in the file itself.
@@ -87,10 +87,10 @@
graph_axis_unit_change_callback y_axis_unit_change_callback;
unsigned int base_offset;
unsigned int dont_graph_all_zeroes;
- double left_extra;
- double right_extra;
- double top_extra;
- double bottom_extra;
+ double left_extra;
+ double right_extra;
+ double top_extra;
+ double bottom_extra;
double xtick_zero;
double xtick_delta;
@@ -263,7 +263,7 @@
cairo_close_path(cr);
cairo_fill(cr);
cairo_stroke(cr);
- bar_num++;
+ bar_num++;
}
}
@@ -271,11 +271,11 @@
double *x1, double *y1, double *x2, double *y2)
{
cairo_set_source_rgb(cr, 0, 0, 0);
- cairo_set_line_width (cr, 0.8);
+ cairo_set_line_width(cr, 0.8);
- *x1 = 0.10 * g->xdim;
+ *x1 = 0.10 * g->xdim;
*x2 = 0.95 * g->xdim;
- *y1 = 0.10 * g->ydim;
+ *y1 = 0.10 * g->ydim;
*y2 = 0.90 * g->ydim;
cairo_move_to(cr, *x1, *y1);
@@ -459,7 +459,7 @@
draw_bars(bg, cr, lb, label_offset, bar_width, mindata, maxdata);
// draw_centered_text(cr, label_offset + (bar_width / 2.0 + bar_width * 0.1), bg->ydim * 0.93,
draw_centered_text(cr, bg->font, x1 + space_per_label * (i + 0.5), bg->ydim * 0.93,
- 12.0, lb->label);
+ 12.0, lb->label);
i++;
}
cairo_stroke(cr);
@@ -498,7 +498,7 @@
first = 0;
answer = tmp;
}
- answer = cmp(tmp, answer);
+ answer = cmp(tmp, answer);
}
}
@@ -618,7 +618,7 @@
{
struct flist_head *entry;
struct graph_label *i;
-
+
flist_for_each(entry, &bg->label_list) {
i = flist_entry(entry, struct graph_label, list);
@@ -632,7 +632,7 @@
graph_label_t graph_add_label(struct graph *bg, const char *label)
{
struct graph_label *i;
-
+
i = graph_find_label(bg, label);
if (i)
return i; /* already present. */
@@ -818,7 +818,7 @@
while (!flist_empty(&l->value_list)) {
i = flist_entry(l->value_list.next, struct graph_value, list);
graph_value_drop(l, i);
- }
+ }
}
static void graph_free_labels(struct graph *g)
@@ -830,7 +830,7 @@
flist_del(&i->list);
graph_free_values(i);
free(i);
- }
+ }
}
void graph_set_color(struct graph *gr, graph_label_t label, double red,
@@ -878,13 +878,14 @@
g->per_label_limit = per_label_limit;
}
-void graph_add_extra_space(struct graph *g, double left_percent, double right_percent,
- double top_percent, double bottom_percent)
+void graph_add_extra_space(struct graph *g, double left_percent,
+ double right_percent, double top_percent,
+ double bottom_percent)
{
- g->left_extra = left_percent;
- g->right_extra = right_percent;
- g->top_extra = top_percent;
- g->bottom_extra = bottom_percent;
+ g->left_extra = left_percent;
+ g->right_extra = right_percent;
+ g->top_extra = top_percent;
+ g->bottom_extra = bottom_percent;
}
/*
diff --git a/io_u.c b/io_u.c
index a4f378d..273cc91 100644
--- a/io_u.c
+++ b/io_u.c
@@ -78,7 +78,7 @@
mask = -1UL;
else
mask = ((1UL << this_blocks) - 1) << bit;
-
+
if (!(f->file_map[idx] & mask))
break;
@@ -310,7 +310,7 @@
ret = 1;
}
}
-
+
if (!ret) {
if (offset != -1ULL)
io_u->offset = offset;
@@ -1427,7 +1427,7 @@
io_u_log_error(td, io_u);
}
if (icd->error && td_non_fatal_error(icd->error) &&
- (td->o.continue_on_error & td_error_type(io_u->ddir, icd->error))) {
+ (td->o.continue_on_error & td_error_type(io_u->ddir, icd->error))) {
/*
* If there is a non_fatal error, then add to the error count
* and clear all the errors.
diff --git a/ioengines.c b/ioengines.c
index bb7833f..b3c2e51 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -234,7 +234,7 @@
out:
if (r >= 0) {
/*
- * Reflect that our submitted requests were retrieved with
+ * Reflect that our submitted requests were retrieved with
* whatever OS async calls are in the underlying engine.
*/
td->io_u_in_flight -= r;
@@ -360,14 +360,14 @@
if (!td->cur_depth || !td->io_u_queued)
return 0;
- io_u_mark_depth(td, td->io_u_queued);
+ io_u_mark_depth(td, td->io_u_queued);
if (td->io_ops->commit) {
ret = td->io_ops->commit(td);
if (ret)
td_verror(td, -ret, "io commit");
}
-
+
/*
* Reflect that events were submitted as async IO requests.
*/
@@ -532,7 +532,7 @@
ret = os_trim(f->fd, io_u->offset, io_u->xfer_buflen);
if (!ret)
- return io_u->xfer_buflen;;
+ return io_u->xfer_buflen;
io_u->error = ret;
return 0;
diff --git a/iolog.c b/iolog.c
index 4818cd4..0e49236 100644
--- a/iolog.c
+++ b/iolog.c
@@ -110,7 +110,7 @@
{
struct io_piece *ipo;
unsigned long elapsed;
-
+
while (!flist_empty(&td->io_log_list)) {
int ret;
@@ -141,11 +141,10 @@
elapsed = mtime_since_genesis();
if (ipo->delay > elapsed)
usec_sleep(td, (ipo->delay - elapsed) * 1000);
-
}
free(ipo);
-
+
if (io_u->ddir != DDIR_WAIT)
return 0;
}
@@ -370,7 +369,7 @@
ipo->fileno = fileno;
ipo->file_action = file_action;
}
-
+
queue_io_piece(td, ipo);
}
diff --git a/options.c b/options.c
index 161b416..d051da1 100644
--- a/options.c
+++ b/options.c
@@ -37,7 +37,7 @@
{
int base;
- switch(a) {
+ switch (a) {
case '0'...'9':
base = '0';
break;
@@ -50,7 +50,7 @@
default:
base = 0;
}
- return (a - base);
+ return a - base;
}
static int bs_cmp(const void *p1, const void *p2)
@@ -652,7 +652,7 @@
struct thread_data *td = data;
long off;
int i = 0, j = 0, len, k, base = 10;
- char* loc1, * loc2;
+ char *loc1, *loc2;
loc1 = strstr(input, "0x");
loc2 = strstr(input, "0X");
@@ -3014,14 +3014,12 @@
sprintf(buf, "echo '%s' | %s", tmp, BC_APP);
f = popen(buf, "r");
- if (!f) {
+ if (!f)
return NULL;
- }
ret = fread(&buf[tmp - str], 1, 128 - (tmp - str), f);
- if (ret <= 0) {
+ if (ret <= 0)
return NULL;
- }
pclose(f);
buf[(tmp - str) + ret - 1] = '\0';
diff --git a/options.h b/options.h
index ae51cb3..28bfe91 100644
--- a/options.h
+++ b/options.h
@@ -112,5 +112,6 @@
extern struct opt_group *opt_group_from_mask(unsigned int *mask);
extern struct opt_group *opt_group_cat_from_mask(unsigned int *mask);
extern struct fio_option *fio_option_find(const char *name);
+extern unsigned int fio_get_kb_base(void *);
#endif
diff --git a/parse.c b/parse.c
index 545c3de..6317013 100644
--- a/parse.c
+++ b/parse.c
@@ -16,7 +16,6 @@
#include "options.h"
static struct fio_option *__fio_options;
-extern unsigned int fio_get_kb_base(void *);
static int vp_cmp(const void *p1, const void *p2)
{
@@ -47,7 +46,7 @@
static void show_option_range(struct fio_option *o,
int (*logger)(const char *format, ...))
{
- if (o->type == FIO_OPT_FLOAT_LIST){
+ if (o->type == FIO_OPT_FLOAT_LIST) {
if (isnan(o->minfp) && isnan(o->maxfp))
return;
@@ -356,7 +355,7 @@
int first, int more, int curr)
{
int il, *ilp;
- double* flp;
+ double *flp;
long long ull, *ullp;
long ul1, ul2;
double uf;
@@ -479,7 +478,7 @@
o->maxlen);
return 1;
}
- if(!str_to_float(ptr, &uf)){
+ if (!str_to_float(ptr, &uf)) {
log_err("not a floating point value: %s\n", ptr);
return 1;
}
diff --git a/printing.c b/printing.c
index 4058b79..4dcc986 100644
--- a/printing.c
+++ b/printing.c
@@ -36,8 +36,8 @@
cr = gtk_print_context_get_cairo_context(context);
- cairo_set_source_rgb(cr, 0, 0, 0);
- cairo_set_line_width (cr, 5.0);
+ cairo_set_source_rgb(cr, 0, 0, 0);
+ cairo_set_line_width(cr, 5.0);
cairo_move_to(cr, 0.0, 0.0);
cairo_line_to(cr, print_params.width, print_params.height);
cairo_move_to(cr, 0.0, print_params.height);
@@ -48,8 +48,8 @@
y = print_params.height / 5.0;
sprintf(str, "(%g,%g)", x, y);
draw_right_justified_text(cr, "Sans", x, y, 12.0, str);
- cairo_set_source_rgb(cr, 0, 0, 0);
- cairo_set_line_width (cr, 2.0);
+ cairo_set_source_rgb(cr, 0, 0, 0);
+ cairo_set_line_width(cr, 2.0);
cairo_move_to(cr, x, y - 30.0);
cairo_line_to(cr, x, y + 30.0);
cairo_move_to(cr, x - 30, y);
@@ -59,8 +59,8 @@
x *= 2.0;
sprintf(str, "(%g,%g)", x, y);
draw_right_justified_text(cr, "Sans", x, y, 12.0, str);
- cairo_set_source_rgb(cr, 0, 0, 0);
- cairo_set_line_width (cr, 2.0);
+ cairo_set_source_rgb(cr, 0, 0, 0);
+ cairo_set_line_width(cr, 2.0);
cairo_move_to(cr, x, y - 30.0);
cairo_line_to(cr, x, y + 30.0);
cairo_move_to(cr, x - 30, y);
diff --git a/profile.c b/profile.c
index c975843..74f14fa 100644
--- a/profile.c
+++ b/profile.c
@@ -42,7 +42,7 @@
static int add_profile_options(struct profile_ops *ops)
{
struct fio_option *o;
-
+
if (!ops->options)
return 0;
diff --git a/server.c b/server.c
index 2744975..664bb55 100644
--- a/server.c
+++ b/server.c
@@ -276,7 +276,7 @@
struct cmd_text_pdu *pdu = (struct cmd_text_pdu *) cmdret->payload;
char *buf = (char *) pdu->buf;
- buf[pdu->buf_len ] = '\0';
+ buf[pdu->buf_len] = '\0';
} else if (cmdret->opcode == FIO_NET_CMD_JOB) {
struct cmd_job_pdu *pdu = (struct cmd_job_pdu *) cmdret->payload;
char *buf = (char *) pdu->buf;
@@ -663,7 +663,7 @@
ret = handle_run_cmd(cmd);
break;
default:
- log_err("fio: unknown opcode: %s\n",fio_server_op(cmd->opcode));
+ log_err("fio: unknown opcode: %s\n", fio_server_op(cmd->opcode));
ret = 1;
}
@@ -692,7 +692,7 @@
if (!flist_empty(&job_list))
timeout = 100;
-
+
ret = poll(&pfd, 1, timeout);
if (ret < 0) {
if (errno == EINTR)
@@ -1512,7 +1512,7 @@
#if defined(WIN32)
WSADATA wsd;
- WSAStartup(MAKEWORD(2,2), &wsd);
+ WSAStartup(MAKEWORD(2, 2), &wsd);
#endif
if (!pidfile)
diff --git a/stat.c b/stat.c
index 70f9e0a..ac4a000 100644
--- a/stat.c
+++ b/stat.c
@@ -63,12 +63,12 @@
/*
* Discard the error bits and apply the mask to find the
- * index for the buckets in the group
+ * index for the buckets in the group
*/
offset = (FIO_IO_U_PLAT_VAL - 1) & (val >> error_bits);
/* Make sure the index does not exceed (array size - 1) */
- idx = (base + offset) < (FIO_IO_U_PLAT_NR - 1)?
+ idx = (base + offset) < (FIO_IO_U_PLAT_NR - 1) ?
(base + offset) : (FIO_IO_U_PLAT_NR - 1);
return idx;
@@ -86,11 +86,11 @@
/* MSB <= (FIO_IO_U_PLAT_BITS-1), cannot be rounded off. Use
* all bits of the sample as index */
- if (idx < (FIO_IO_U_PLAT_VAL << 1) )
+ if (idx < (FIO_IO_U_PLAT_VAL << 1))
return idx;
/* Find the group and compute the minimum value of that group */
- error_bits = (idx >> FIO_IO_U_PLAT_BITS) -1;
+ error_bits = (idx >> FIO_IO_U_PLAT_BITS) - 1;
base = 1 << (error_bits + FIO_IO_U_PLAT_BITS);
/* Find its bucket number of the group */
@@ -140,7 +140,7 @@
* isn't a worry. Also note that this does not work for NaN values.
*/
if (len > 1)
- qsort((void*)plist, len, sizeof(plist[0]), double_cmp);
+ qsort((void *)plist, len, sizeof(plist[0]), double_cmp);
/*
* Calculate bucket values, note down max and min values
@@ -629,7 +629,7 @@
}
static void show_thread_status_terse_v2(struct thread_stat *ts,
- struct group_run_stats *rs)
+ struct group_run_stats *rs)
{
double io_u_dist[FIO_IO_U_MAP_NR];
double io_u_lat_u[FIO_IO_U_LAT_U_NR];
diff --git a/tickmarks.c b/tickmarks.c
index 6a964e3..808de67 100644
--- a/tickmarks.c
+++ b/tickmarks.c
@@ -3,7 +3,7 @@
#include <malloc.h>
#include <string.h>
-/*
+/*
* adapted from Paul Heckbert's algorithm on p 657-659 of
* Andrew S. Glassner's book, "Graphics Gems"
* ISBN 0-12-286166-3
@@ -128,20 +128,20 @@
printf("Testing range %g - %g\n", x, y);
nticks = calc_tickmarks(x, y, 10, &tm);
- for (i = 0; i < nticks; i++) {
+ for (i = 0; i < nticks; i++)
printf(" (%s) %g\n", tm[i].string, tm[i].value);
- }
+
printf("\n\n");
free(tm);
}
int main(int argc, char *argv[])
{
- test_range(0.0005, 0.008);
- test_range(0.5, 0.8);
- test_range(5.5, 8.8);
- test_range(50.5, 80.8);
- test_range(-20, 20.8);
- test_range(-30, 700.8);
+ test_range(0.0005, 0.008);
+ test_range(0.5, 0.8);
+ test_range(5.5, 8.8);
+ test_range(50.5, 80.8);
+ test_range(-20, 20.8);
+ test_range(-30, 700.8);
}
#endif