From 7044b0ad1d49f60a821e7c1534d259ada8894577 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sun, 30 May 2021 12:04:53 +0200 Subject: Add static qualifiers --- src/main.c | 10 +++++----- src/options.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main.c b/src/main.c index 92c7b8d..27799ad 100644 --- a/src/main.c +++ b/src/main.c @@ -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; -- cgit v1.2.3