aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/inplace.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 7fea3bf0..33fb6459 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-10 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * inplace.c (do_inplace_begin): No need to get the 2nd suffix argument,
+ since it is not currently used in this function.
+
2013-01-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
* inplace.c: New extension to implement in-place editing.
diff --git a/extension/inplace.c b/extension/inplace.c
index 69b188b8..31f21b60 100644
--- a/extension/inplace.c
+++ b/extension/inplace.c
@@ -93,7 +93,7 @@ invalid_filename(const awk_string_t *filename)
static awk_value_t *
do_inplace_begin(int nargs, awk_value_t *result)
{
- awk_value_t filename, suffix;
+ awk_value_t filename;
struct stat sbuf;
char *p;
int fd;
@@ -109,8 +109,10 @@ do_inplace_begin(int nargs, awk_value_t *result)
if (! get_argument(0, AWK_STRING, &filename))
fatal(ext_id, _("inplace_begin: cannot retrieve 1st argument as a string filename"));
- if (! get_argument(1, AWK_STRING, &suffix))
- suffix.str_value.str = NULL;
+ /*
+ * N.B. In the current implementation, the 2nd suffix arg is not used
+ * in this function. It is used only in the inplace_end function.
+ */
if (invalid_filename(&filename.str_value)) {
warning(ext_id, _("inplace_begin: disabling in-place editing for invalid FILENAME `%s'"),