From 04d2a2fc600a17b5efab87cf824f1f87c77b514d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 2 Oct 2012 01:59:32 +0200 Subject: [PATCH] Minor code cleanup --- sparsebundlefs.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sparsebundlefs.cpp b/sparsebundlefs.cpp index 054401e..9740fbf 100644 --- a/sparsebundlefs.cpp +++ b/sparsebundlefs.cpp @@ -1,17 +1,20 @@ #include #include #include -#include -#include #include -#include #include +#include +#include -#include #include +#include #include #include -#include +#include + +#include + +using namespace std; static const char *image_path = "/sparsebundle.dmg"; @@ -19,7 +22,7 @@ struct sparsebundle_data { char *path; off_t band_size; off_t size; - FILE* logfile; + FILE *logfile; }; #define SB_DATA_CAST(ptr) ((struct sparsebundle_data *) ptr) @@ -134,7 +137,7 @@ static int sparsebundle_read(const char *path, char *buffer, size_t length, off_ return bytes_read; } -static int sparsebundle_show_usage(char* program_name) +static int sparsebundle_show_usage(char *program_name) { fprintf(stderr, "usage: %s [-o options] sparsebundle mountpoint\n", program_name); return 1; @@ -150,8 +153,6 @@ static int sparsebundle_opt_proc(void *data, const char *arg, int key, struct fu return 1; } -using namespace std; - static off_t read_size(const string &str) { uintmax_t value = strtoumax(str.c_str(), 0, 10);