diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-16 06:53:57 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-16 06:53:57 -0700 |
commit | 7fa76b06632628882ca214b4cf1fb4c2106f2c7b (patch) | |
tree | a38c0928dff37767ec9de4f247ec7178de0e3a7a /txr.c | |
parent | c7b7e82868a5fb1cd024e7570f973f5807248379 (diff) | |
download | txr-7fa76b06632628882ca214b4cf1fb4c2106f2c7b.tar.gz txr-7fa76b06632628882ca214b4cf1fb4c2106f2c7b.tar.bz2 txr-7fa76b06632628882ca214b4cf1fb4c2106f2c7b.zip |
Most uses of auto_str should be static_str.
These functions do exactly same thing, but communicate
something different to the reader of the code.
An auto_str is on the stack, and so must not be passed
somewhere where it will be retained.
* txr.c (help, compat, txr_main): Use static_str on version.
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -163,7 +163,7 @@ static void help(void) "are mutually exclusive; the right-most one dominates.\n" "\n" ); - format(std_output, text, auto_str(version), prog_string, nao); + format(std_output, text, static_str(version), prog_string, nao); } #if HAVE_TERMIOS @@ -369,7 +369,7 @@ static int compat(val optval) if (min) { format(std_error, lit("~a: compatibility with versions " "lower than ~a not supported by version ~a\n"), - prog_string, num(min), auto_str(version), nao); + prog_string, num(min), static_str(version), nao); return 0; } @@ -501,7 +501,7 @@ int txr_main(int argc, char **argv) if (equal(opt, lit("version"))) { format(std_output, lit("~a: version ~a\n"), - prog_string, auto_str(version), nao); + prog_string, static_str(version), nao); return 0; } |