Skip to content

Commit 643409e

Browse files
committed
remove blank space at the end of line
1 parent e3ce1e2 commit 643409e

23 files changed

+39
-39
lines changed

devel/mod_test.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ read_test_stats(struct module *mod, const char *parameter)
6565
return;
6666
}
6767

68-
static void
68+
static void
6969
set_test_record(struct module *mod, double st_array[],
7070
U_64 pre_array[], U_64 cur_array[], int inter)
7171
{

include/define.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#define MOD_INFO_SIZE sizeof(strcut mod_info)
5757

5858
#define DEFAULT_CONF_FILE_PATH "/etc/tsar/tsar.conf"
59-
#define DEFAULT_OUTPUT_FILE_PATH "/var/log/tsar.data"
59+
#define DEFAULT_OUTPUT_FILE_PATH "/var/log/tsar.data"
6060
#define MIN_STRING "MIN: "
6161
#define MEAN_STRING "MEAN: "
6262
#define MAX_STRING "MAX: "

include/output_file.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct buffer {
3232

3333
struct file_header {
3434
int version;
35-
time_t t_start;
35+
time_t t_start;
3636
};
3737

3838

include/public.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ inline void func_mod_free(struct module *mod)
279279
pos[(idx)], (otype)); \
280280
}while(0)
281281

282-
inline char *getitem(char *r, char *mnt)
282+
inline char *getitem(char *r, char *mnt)
283283
{
284284
char *start, *end;
285285
if (r == NULL || *r == '\0') {

modules/mod_apache.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ read_apache_stats(struct module *mod)
6363
servaddr.sin_family = AF_INET;
6464
servaddr.sin_port = htons(hinfo.port);
6565
inet_pton(AF_INET, hinfo.host, &servaddr.sin_addr);
66-
sprintf(request,
66+
sprintf(request,
6767
"GET /%s HTTP/1.0\r\n"
6868
"User-Agent: Wget/1.9\r\n"
6969
"Host: %s\r\n"

modules/mod_cgblkio.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ read_cgblkio_stats(struct module *mod)
215215
}
216216
while (fgets(buffer, 128, iofd) != NULL) {
217217
if (sscanf(buffer, "%s %s %llu", curr.disk, curr.type, &curr.num) == 3) {
218-
if (!strncmp(curr.type, "Read", 4))
218+
if (!strncmp(curr.type, "Read", 4))
219219
blkio_groups[n_group].svctm += (unsigned long long)(curr.num / 1000000); //in ms
220-
if (!strncmp(curr.type, "Write", 5))
220+
if (!strncmp(curr.type, "Write", 5))
221221
blkio_groups[n_group].svctm += (unsigned long long )(curr.num / 1000000);
222222
}
223223
}

modules/mod_cpu.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ read_cpu_stats(struct module *mod)
7676
}
7777
}
7878

79-
static void
79+
static void
8080
set_cpu_record(struct module *mod, double st_array[],
8181
U_64 pre_array[], U_64 cur_array[], int inter)
8282
{

modules/mod_haproxy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int np_net_connect(const char *address, int port, int *sd, char* proto);
2424
int get_http_status();
2525
int StrToInt(const char* str);
2626
int get_haproxy_detail();
27-
int sd;
27+
int sd;
2828
int was_refused = 0;
2929
int econn_refuse_state = 2;
3030
int address_family = AF_INET;

modules/mod_irq.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "public.h"
22

33
#define IRQ_DETAIL_HDR " intr"
4-
#define IRQ_STORE_FMT(d) "%lld"
4+
#define IRQ_STORE_FMT(d) "%lld"
55
#define IRQ_SUMMARY_HDR "intr/s"
66

77
char * irq_usage = " --irq Interrupts statistics";
@@ -44,12 +44,12 @@ static union __irq_statistics irq_statistics[MAXIRQ][NR_ARRAY];
4444
target[MEAN].irq_detail.member, \
4545
target[MAX].irq_detail.member, \
4646
target[MIN].irq_detail.member, \
47-
(i))
47+
(i))
4848

4949
static int f_init = FALSE;
5050

5151
char word[12]; // reocrd the word read from textline
52-
char textline[256]; //record a line of text
52+
char textline[256]; //record a line of text
5353
unsigned char text_index = 0; //the index of textline above
5454

5555
static void
@@ -154,7 +154,7 @@ count_irq_nr(char *record)
154154
return n;
155155
}
156156

157-
void
157+
void
158158
read_irq_stat(struct module *mod, int data_type)
159159
{
160160
int i, pos = 0;
@@ -202,7 +202,7 @@ read_irq_stat(struct module *mod, int data_type)
202202
}
203203

204204

205-
void
205+
void
206206
__irq_ops(char *_detail_last, char *_detail_curr, int dtype, int otype, stats_irq si,
207207
char *_buf, int *pos, unsigned long itv, unsigned int idx)
208208
{
@@ -238,7 +238,7 @@ irq_ops(char *last_record, char *curr_record, time_t last_time,
238238
char buf[MAX_LINE_LEN];
239239
unsigned int i = 0;
240240
unsigned long itv;
241-
/* if statistic structure is not inited,
241+
/* if statistic structure is not inited,
242242
we will alloc space here */
243243
int nr = count_irq_nr(last_record);
244244
if (!f_init) {

modules/mod_ktables.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ read_kernel_tables(struct module *mod, int data_type)
9999
return;
100100
}
101101
}
102-
int pos = KTABLES_STRING_OPS(buf, sprintf,
102+
int pos = KTABLES_STRING_OPS(buf, sprintf,
103103
KTABLES_STORE_FMT(DATA_SPLIT), st_ktables, ->);
104104
buf[pos] = '\0';
105105
mod->detail = strdup(buf);
@@ -129,10 +129,10 @@ ktables_ops(char *last_record, char *curr_record, time_t last_time,
129129

130130
CALITV(last_time, curr_time, itv);
131131

132-
KTABLES_STRING_OPS(last_record, sscanf,
132+
KTABLES_STRING_OPS(last_record, sscanf,
133133
KTABLES_STORE_FMT(DATA_SPLIT), &s_st_ktables[1], .);
134134

135-
KTABLES_STRING_OPS(curr_record, sscanf,
135+
KTABLES_STRING_OPS(curr_record, sscanf,
136136
KTABLES_STORE_FMT(DATA_SPLIT), &s_st_ktables[0], .);
137137

138138
DECLARE_TMP_MOD_STATISTICS(ktables);

modules/mod_nginx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ read_nginx_stats(struct module *mod, char *parameter)
9999

100100
init_nginx_host_info(&hinfo);
101101
if (atoi(parameter) != 0) {
102-
hinfo.port = atoi(parameter);
102+
hinfo.port = atoi(parameter);
103103
}
104104
struct stats_nginx st_nginx;
105105
memset(&st_nginx, 0, sizeof(struct stats_nginx));

modules/mod_paging.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ union paging_statistics {
6363
*
6464
*******************************************
6565
*/
66-
void
66+
void
6767
read_vmstat_paging(struct module *mod, int data_type)
6868
{
6969
int ok = FALSE;
@@ -124,7 +124,7 @@ read_vmstat_paging(struct module *mod, int data_type)
124124
st_paging->pgscan_direct += pgtmp;
125125
}
126126
}
127-
int pos = PAGING_STRING_OPS(buf, sprintf,
127+
int pos = PAGING_STRING_OPS(buf, sprintf,
128128
PAGING_STORE_FMT(DATA_SPLIT), st_paging, ->);
129129
buf[pos] = '\0';
130130
mod->detail = strdup(buf);
@@ -207,7 +207,7 @@ get_paging_avg(int data_type, int count)
207207
__PRINT_AVG(statis, pos, paging_statis, paging_detail.kswapd, i, count, OUTPUT_PRINT);
208208
__PRINT_AVG(statis, pos, paging_statis, paging_detail.direct, i, count, OUTPUT_PRINT);
209209
__PRINT_AVG(statis, pos, paging_statis, paging_detail.steal, i, count, OUTPUT_PRINT);
210-
}
210+
}
211211

212212
else if(data_type == DATA_SUMMARY) {
213213
__PRINT_AVG(statis, pos, paging_statis, paging_summary.in, i, count, OUTPUT_PRINT);

modules/mod_partition.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct stats_partition {
2020
};
2121
#define STATS_PARTITION_SIZE (sizeof(struct stats_partition))
2222

23-
int
23+
int
2424
__read_partition_stat(char *fsname, struct stats_partition *sp)
2525
{
2626
struct statfs fsbuf;
@@ -36,7 +36,7 @@ __read_partition_stat(char *fsname, struct stats_partition *sp)
3636
}
3737

3838
int
39-
store_single_partition(char *buf, char *mntpath, struct stats_partition *sp)
39+
store_single_partition(char *buf, char *mntpath, struct stats_partition *sp)
4040
{
4141
int len = 0;
4242
float util;

modules/mod_pcsw.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ read_stat_pcsw(struct module *mod)
4646
sscanf(line + 10, "%lu", &st_pcsw.processes);
4747
}
4848
}
49-
int pos = sprintf(buf, "%lld,%ld",
49+
int pos = sprintf(buf, "%lld,%ld",
5050
st_pcsw.context_switch,
5151
st_pcsw.processes);
5252
buf[pos] = '\0';

modules/mod_rndc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ read_rndc_stats(struct module *mod)
150150
{
151151
memset(g_buf, 0, sizeof(g_buf));
152152
create_script();
153-
exec_script();
153+
exec_script();
154154
parse_stat_file(g_buf);
155155
set_mod_record(mod, g_buf);
156156
}

modules/mod_squid.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ a_trim(char *str, int len)
134134
return dest;
135135
}
136136

137-
int
137+
int
138138
read_a_int_value(char *buf, char *key, unsigned int *ret, int type)
139139
{
140140
int k;
@@ -155,7 +155,7 @@ read_a_int_value(char *buf, char *key, unsigned int *ret, int type)
155155
}
156156
}
157157

158-
int
158+
int
159159
read_a_long_long_value(char *buf, char *key, unsigned long long *ret, int type)
160160
{
161161
int k;

modules/mod_swift_fwd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct mod_info swift_fwd_info[] = {
4444
{" rt", DETAIL_BIT, 0, STATS_NULL}
4545
};
4646
/* opens a tcp or udp connection to a remote host or local socket */
47-
int
47+
int
4848
my_swift_fwd_net_connect(const char *host_name, int port, int *sd, char* proto)
4949
{
5050
int result;

modules/mod_tcpx.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ read_stat_tcpx(struct module *mod)
4545
fp_netstat = fopen(NETSTAT, "r");
4646
if (fp_netstat == NULL) {
4747
return;
48-
}
48+
}
4949
st_tcpx.tcplistenq = 0;
5050
st_tcpx.tcplistenincq = 0;
5151

5252
sw = 0;
5353
while (fgets(line, LEN_4096, fp_netstat) !=NULL) {
5454
if (!strncmp(line, "TcpExt:", 7)) {
5555
if (!sw) {sw = 1; continue;}
56-
sscanf(line + 7,
56+
sscanf(line + 7,
5757
"%*u %*u %*u %*u %*u %*u %*u %*u %*u "
5858
"%*u %*u %*u %*u %*u %*u %*u %*u %*u "
5959
"%*u %llu %*u %*u %*u %*u %*u %*u %*u "
@@ -85,7 +85,7 @@ read_stat_tcpx(struct module *mod)
8585
st_tcpx.tcppersistdrop = 0;
8686
st_tcpx.tcpkadrop = 0;
8787

88-
int pos = sprintf(buf,
88+
int pos = sprintf(buf,
8989
"%llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu,"
9090
"%llu,%llu,%llu,%llu,%llu,%llu,%llu",
9191
st_tcpx.tcprecvq,

modules/mod_tmd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static struct mod_info tmd_info[] = {
2929
};
3030

3131

32-
static void
32+
static void
3333
set_tmd_record(struct module *mod, double st_array[],
3434
U_64 pre_array[], U_64 cur_array[], int inter)
3535
{

modules/mod_ts_cache.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ set_ts_cache_record(struct module *mod, double st_array[],
136136

137137
} else {
138138
if (cur_array[3] > pre_array[3]) {
139-
st_array[1] = (cur_array[4] - pre_array[4]) * 100.0 / (cur_array[3] - pre_array[3]);
140-
st_array[6] = (cur_array[5] - pre_array[5]) * 100.0 / (cur_array[3] - pre_array[3]);
139+
st_array[1] = (cur_array[4] - pre_array[4]) * 100.0 / (cur_array[3] - pre_array[3]);
140+
st_array[6] = (cur_array[5] - pre_array[5]) * 100.0 / (cur_array[3] - pre_array[3]);
141141
}
142142
}
143143
}

modules/mod_ts_conn.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static struct mod_info ts_conn_info[] = {
4646
{" t_srv", DETAIL_BIT, 0, STATS_NULL},
4747
};
4848

49-
void
49+
void
5050
set_ts_conn_record(struct module *mod, double st_array[],
5151
U_64 pre_array[], U_64 cur_array[], int inter)
5252
{

modules/mod_ts_err.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static struct mod_info ts_err_info[] = {
5050
{"hangup", SUMMARY_BIT, 0, STATS_NULL}
5151
};
5252

53-
void
53+
void
5454
set_ts_err_record(struct module *mod, double st_array[],
5555
U_64 pre_array[], U_64 cur_array[], int inter)
5656
{

modules/mod_udp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "tsar.h"
22

33
#define UDP_DETAIL_HDR(d) \
4-
" idgm"d" odgm"d"noport"d"idmerr"
4+
" idgm"d" odgm"d"noport"d"idmerr"
55

66
char *udp_usage =
77
" --udp UDP traffic (v4)";
@@ -10,7 +10,7 @@ char *udp_usage =
1010
struct stats_udp {
1111
unsigned long long InDatagrams;
1212
unsigned long long OutDatagrams;
13-
unsigned long long NoPorts;
13+
unsigned long long NoPorts;
1414
unsigned long long InErrors;
1515
};
1616

0 commit comments

Comments
 (0)