diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
commit | 76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 (patch) | |
tree | 8b50298f41bd29d55bbd6f4301f36ad31dc0b008 /linux.c | |
parent | 006265d7a088cff4fea665159dbb454956c2cd76 (diff) | |
download | subsurface-76e6420f6b3503b76bd3eec00ab0e53d6ea17a20.tar.gz |
Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'linux.c')
-rw-r--r-- | linux.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -25,7 +25,7 @@ const char *system_default_filename(void) return buffer; } -int enumerate_devices (device_callback_t callback, void *userdata) +int enumerate_devices(device_callback_t callback, void *userdata) { int index = -1; DIR *dp = NULL; @@ -44,28 +44,28 @@ int enumerate_devices (device_callback_t callback, void *userdata) char *fname; size_t len; - dp = opendir (dirname); + dp = opendir(dirname); if (dp == NULL) { return -1; } - while ((ep = readdir (dp)) != NULL) { + while ((ep = readdir(dp)) != NULL) { for (i = 0; patterns[i] != NULL; ++i) { - if (fnmatch (patterns[i], ep->d_name, 0) == 0) { + if (fnmatch(patterns[i], ep->d_name, 0) == 0) { char filename[1024]; - int n = snprintf (filename, sizeof (filename), "%s/%s", dirname, ep->d_name); - if (n >= sizeof (filename)) { - closedir (dp); + int n = snprintf(filename, sizeof(filename), "%s/%s", dirname, ep->d_name); + if (n >= sizeof(filename)) { + closedir(dp); return -1; } - callback (filename, userdata); + callback(filename, userdata); if (is_default_dive_computer_device(filename)) index = i; break; } } } - closedir (dp); + closedir(dp); file = fopen("/proc/mounts", "r"); if (file == NULL) @@ -91,7 +91,7 @@ int enumerate_devices (device_callback_t callback, void *userdata) index = i; i++; free((void *)fname); - } + } } free(line); |