aboutsummaryrefslogtreecommitdiffstats
path: root/src/args.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-11-02 18:59:40 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2011-11-02 19:33:23 +0100
commitce3f0ce76f59216ff82ecd79e180a5c59d3d60d0 (patch)
treea0d7618a75c1f9aae4efe2059efb90f8a066b546 /src/args.c
parent7cc6305588acea9c7960abaacf823d62f798f5ba (diff)
downloadcalcurse-ce3f0ce76f59216ff82ecd79e180a5c59d3d60d0.tar.gz
calcurse-ce3f0ce76f59216ff82ecd79e180a5c59d3d60d0.zip
Make use of the NULL macro
Use this constant everywhere when referring to a null pointer instead of casting 0 to various types of pointers. Created using following semantic patch: @@ type type; @@ - (type *)0 + NULL Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/args.c')
-rw-r--r--src/args.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/args.c b/src/args.c
index 150b81c..be85fbe 100644
--- a/src/args.c
+++ b/src/args.c
@@ -906,10 +906,10 @@ parse_args (int argc, char **argv, struct conf *conf)
else if (gflag)
{
io_init (cfile, datadir);
- io_check_dir (path_dir, (int *)0);
- io_check_dir (path_notes, (int *)0);
- io_check_file (path_apts, (int *)0);
- io_check_file (path_todo, (int *)0);
+ io_check_dir (path_dir, NULL);
+ io_check_dir (path_notes, NULL);
+ io_check_file (path_apts, NULL);
+ io_check_file (path_todo, NULL);
io_load_app ();
io_load_todo ();
note_gc ();
@@ -920,13 +920,13 @@ parse_args (int argc, char **argv, struct conf *conf)
if (load_data)
{
io_init (cfile, datadir);
- io_check_dir (path_dir, (int *)0);
- io_check_dir (path_notes, (int *)0);
+ io_check_dir (path_dir, NULL);
+ io_check_dir (path_notes, NULL);
}
if (iflag)
{
- io_check_file (path_apts, (int *)0);
- io_check_file (path_todo, (int *)0);
+ io_check_file (path_apts, NULL);
+ io_check_file (path_todo, NULL);
/* Get default pager in case we need to show a log file. */
vars_init (conf);
io_load_app ();
@@ -938,8 +938,8 @@ parse_args (int argc, char **argv, struct conf *conf)
}
if (xflag)
{
- io_check_file (path_apts, (int *)0);
- io_check_file (path_todo, (int *)0);
+ io_check_file (path_apts, NULL);
+ io_check_file (path_todo, NULL);
io_load_app ();
io_load_todo ();
io_export_data (xfmt, conf);
@@ -948,22 +948,22 @@ parse_args (int argc, char **argv, struct conf *conf)
}
if (tflag)
{
- io_check_file (path_todo, (int *)0);
+ io_check_file (path_todo, NULL);
io_load_todo ();
todo_arg (tnum, Nflag, preg);
non_interactive = 1;
}
if (nflag)
{
- io_check_file (path_apts, (int *)0);
+ io_check_file (path_apts, NULL);
io_load_app ();
next_arg ();
non_interactive = 1;
}
if (dflag || rflag || sflag)
{
- io_check_file (path_apts, (int *)0);
- io_check_file (path_conf, (int *)0);
+ io_check_file (path_apts, NULL);
+ io_check_file (path_conf, NULL);
io_load_app ();
custom_load_conf (conf); /* To get output date format. */
if (dflag)
@@ -977,8 +977,8 @@ parse_args (int argc, char **argv, struct conf *conf)
{
struct date day;
- io_check_file (path_apts, (int *)0);
- io_check_file (path_conf, (int *)0);
+ io_check_file (path_apts, NULL);
+ io_check_file (path_conf, NULL);
vars_init (conf);
custom_load_conf (conf); /* To get output date format. */
io_load_app ();