Skip to content

Commit

Permalink
minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidaty committed Jan 1, 2022
1 parent b6d6fc3 commit c4413b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ THIS_MAKEFILE_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
THIS_DIR:=$(shell basename "${THIS_MAKEFILE_DIR}")
THIS_MAKEFILE:=$(lastword $(MAKEFILE_LIST))

CONFIGFILE=config.mk
CONFIGFILE ?= config.mk
include ${CONFIGFILE}

CONFIGFILEPATH=$(shell ls ${CONFIGFILE} >/dev/null 2>/dev/null && realpath ${CONFIGFILE})
Expand Down
1 change: 0 additions & 1 deletion app/desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ int MAIN(int argc, const char *argv[]) {
data.max_cols = atoi(argv[arg_i]);
}
else {
int err = 0;
if(data.opts.stream) {
err = 1;
fprintf(stderr, "Input file specified twice, or unrecognized argument: %s\n", argv[arg_i]);
Expand Down
6 changes: 3 additions & 3 deletions include/zsv/utils/arg.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ int zsv_args_to_opts(int argc, const char *argv[],
);

#define INIT_DEFAULT_ARGS() do { \
struct zsv_opts opts; \
int err = zsv_args_to_opts(argc, argv, &argc, argv, &opts); \
struct zsv_opts otmp; \
int err = zsv_args_to_opts(argc, argv, &argc, argv, &otmp); \
if(err) return err; \
else zsv_set_default_opts(opts); \
else zsv_set_default_opts(otmp); \
} while(0)

#ifdef ZSV_CLI
Expand Down

0 comments on commit c4413b3

Please sign in to comment.