summaryrefslogtreecommitdiff
path: root/examples/ls-files.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ls-files.c')
-rw-r--r--examples/ls-files.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/ls-files.c b/examples/ls-files.c
index b82af0124..a23506962 100644
--- a/examples/ls-files.c
+++ b/examples/ls-files.c
@@ -25,11 +25,11 @@
* This currently supports the default behavior and the `--error-unmatch` option.
*/
-typedef struct {
+struct ls_options {
int error_unmatch;
char *files[1024];
size_t file_count;
-} ls_options;
+};
static void usage(const char *message, const char *arg)
{
@@ -41,12 +41,12 @@ static void usage(const char *message, const char *arg)
exit(1);
}
-static int parse_options(ls_options *opts, int argc, char *argv[])
+static int parse_options(struct ls_options *opts, int argc, char *argv[])
{
int parsing_files = 0;
int i;
- memset(opts, 0, sizeof(ls_options));
+ memset(opts, 0, sizeof(struct ls_options));
if (argc < 2)
return 0;
@@ -78,7 +78,7 @@ static int parse_options(ls_options *opts, int argc, char *argv[])
return 0;
}
-static int print_paths(ls_options *opts, git_index *index)
+static int print_paths(struct ls_options *opts, git_index *index)
{
size_t i;
const git_index_entry *entry;
@@ -113,7 +113,7 @@ static int print_paths(ls_options *opts, git_index *index)
int lg2_ls_files(git_repository *repo, int argc, char *argv[])
{
git_index *index = NULL;
- ls_options opts;
+ struct ls_options opts;
int error;
if ((error = parse_options(&opts, argc, argv)) < 0)