X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fterminal-opts.c;h=d885cd0ef627a0b400c0c911d671a8d8f440dcad;hb=49c02dd0d35698fd43528c4422b3b5202b481a11;hp=775e36c44bb6238c18417716ebf87fd29aee9cc8;hpb=facccd979e0726b261ae419f9a817ee75a445e16;p=pspp diff --git a/src/ui/terminal/terminal-opts.c b/src/ui/terminal/terminal-opts.c index 775e36c44b..d885cd0ef6 100644 --- a/src/ui/terminal/terminal-opts.c +++ b/src/ui/terminal/terminal-opts.c @@ -28,6 +28,7 @@ #include "language/syntax-file.h" #include "libpspp/argv-parser.h" #include "libpspp/assertion.h" +#include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/getl.h" #include "libpspp/llx.h" @@ -273,7 +274,7 @@ terminal_option_callback (int id, void *to_) case OPT_VERSION: version_etc (stdout, "pspp", PACKAGE_NAME, PACKAGE_VERSION, "Ben Pfaff", "John Darrington", "Jason Stover", - (char *) NULL); + NULL_SENTINEL); exit (EXIT_SUCCESS); default: @@ -286,7 +287,7 @@ terminal_opts_init (struct argv_parser *ap, struct source_stream *ss) { struct terminal_opts *to; - to = xmalloc (sizeof *to); + to = xzalloc (sizeof *to); to->source_stream = ss; to->syntax_mode = GETL_BATCH; string_map_init (&to->options);