diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-08-08 10:04:01 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-08-12 21:06:27 (GMT) |
commit | c52087601198f3fb8ec97839e30c6f6309f0d680 (patch) | |
tree | a5646cac6bbe847f242dc4d8853a1257d9a70f84 /lib/utils.c | |
parent | 625c8f13cf793ba61365c510970f4569a483f2ba (diff) | |
download | libnl-c52087601198f3fb8ec97839e30c6f6309f0d680.zip libnl-c52087601198f3fb8ec97839e30c6f6309f0d680.tar.gz libnl-c52087601198f3fb8ec97839e30c6f6309f0d680.tar.bz2 |
trivial: whitespace-only fixes for src and lib
Fixes alignment, lines with just whitespace and mixed tab/space
indentation. Searched, reviewed and optionally fixed in vim using
regex ^\t* [\t ]*\([^*us ]\|$\)\|\t\+$
http://lists.infradead.org/pipermail/libnl/2016-August/002183.html
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/utils.c')
-rw-r--r-- | lib/utils.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/utils.c b/lib/utils.c index 3399c03..7bcc251 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -57,7 +57,7 @@ struct nl_dump_params nl_debug_dp = { static void __init nl_debug_init(void) { char *nldbg, *end; - + if ((nldbg = getenv("NLDBG"))) { long level = strtol(nldbg, &end, 0); if (nldbg != end) @@ -202,11 +202,11 @@ int nl_rate2str(unsigned long long rate, int type, char *buf, size_t len) case NL_BYTE_RATE: frac = nl_cancel_down_bytes(rate, &unit); break; - + case NL_BIT_RATE: frac = nl_cancel_down_bits(rate, &unit); break; - + default: BUG(); } @@ -435,19 +435,19 @@ static void __init get_psched_settings(void) getenv("PROC_ROOT")); else strncpy(name, "/proc/net/psched", sizeof(name) - 1); - + if ((fd = fopen(name, "r"))) { unsigned int ns_per_usec, ns_per_tick, nom, denom; if (fscanf(fd, "%08x %08x %08x %08x", &ns_per_usec, &ns_per_tick, &nom, &denom) != 4) { - NL_DBG(1, "Fatal error: can not read psched settings from \"%s\". " \ - "Try to set TICKS_PER_USEC, PROC_NET_PSCHED or PROC_ROOT " \ - "environment variables\n", name); - exit(1); - } + NL_DBG(1, "Fatal error: can not read psched settings from \"%s\". " \ + "Try to set TICKS_PER_USEC, PROC_NET_PSCHED or PROC_ROOT " \ + "environment variables\n", name); + exit(1); + } - ticks_per_usec = (double) ns_per_usec / + ticks_per_usec = (double) ns_per_usec / (double) ns_per_tick; if (nom == 1000000) @@ -1066,7 +1066,7 @@ int __str2flags(const char *buf, const struct trans_tbl *tbl, size_t tbl_len) for (;;) { if (*p == ' ') p++; - + t = strchr(p, ','); len = t ? t - p : strlen(p); for (i = 0; i < tbl_len; i++) |