diff options
| author | Jan Sucan <jan@jansucan.com> | 2021-05-30 12:04:53 +0200 |
|---|---|---|
| committer | Jan Sucan <jan@jansucan.com> | 2021-05-30 12:04:53 +0200 |
| commit | 7044b0ad1d49f60a821e7c1534d259ada8894577 (patch) | |
| tree | 323cf9ac4138bfc5091a460e0a99641fb2fca060 | |
| parent | 34fd60da22dae7711eb28f695c6b231a5ec83180 (diff) | |
Add static qualifiers
| -rw-r--r-- | src/main.c | 10 | ||||
| -rw-r--r-- | src/options.c | 8 |
2 files changed, 9 insertions, 9 deletions
@@ -11,14 +11,14 @@ #include "print.h" #include "resources.h" -void +static void clean_exit(resources_t *const res, int exit_code) { resources_free(res); exit(exit_code); } -int +static int open_files(const options_t *const opts, resources_t *const res, bool is_action_backup) { @@ -58,7 +58,7 @@ open_files(const options_t *const opts, resources_t *const res, return 0; } -bool +static bool is_reference_file_valid(resources_t *const res, uint32_t sector_size) { const long ref_size = file_size(res->ref_file); @@ -129,7 +129,7 @@ is_reference_file_valid(resources_t *const res, uint32_t sector_size) return true; } -int +static int diff_backup(const options_t *const opts, resources_t *const res) { const long in_size = file_size(res->in_file); @@ -271,7 +271,7 @@ diff_backup(const options_t *const opts, resources_t *const res) return 0; } -int +static int diff_restore(const options_t *const opts, resources_t *const res) { /* Check validity of the reference file */ diff --git a/src/options.c b/src/options.c index a4dbcb9..366bb1f 100644 --- a/src/options.c +++ b/src/options.c @@ -14,8 +14,8 @@ #define OPTIONS_DEFAULT_SECTOR_SIZE 512 #define OPTIONS_DEFAULT_BUFFER_SIZE (4 * 1024 * 1024) -void options_init(options_t *const opts); -int options_parse_unsigned(const char *const arg, uint32_t *const value); +static void options_init(options_t *const opts); +static int options_parse_unsigned(const char *const arg, uint32_t *const value); int options_parse(int argc, char **argv, options_t *const opts) @@ -106,7 +106,7 @@ options_usage(int exit_code) exit(exit_code); } -void +static void options_init(options_t *const opts) { opts->help = false; @@ -118,7 +118,7 @@ options_init(options_t *const opts) opts->out_file_path = NULL; } -int +static int options_parse_unsigned(const char *const arg, uint32_t *const value) { char *end; |
