X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-reader.c;h=b2db755732311d6c6ba8dda47044225edffa80c2;hb=85e8724e69cf54946c7b40628e88f2ec12368d7c;hp=6010d77313bb81a23f1442c15e6af808690745d3;hpb=7bf210c4fd179a22dd8c6a071f0b23f7ae4e14c2;p=pspp diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 6010d77313..b2db755732 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -2335,7 +2335,14 @@ parse_attributes (struct sfm_reader *r, struct text_record *text, break; } if (attrs != NULL) - attrset_add (attrs, attr); + { + if (!attrset_try_add (attrs, attr)) + { + text_warn (r, text, _("Duplicate attribute %s."), + attribute_get_name (attr)); + attribute_destroy (attr); + } + } else attribute_destroy (attr); } @@ -3497,7 +3504,7 @@ read_ztrailer (struct sfm_reader *r, if (fstat (fileno (r->file), &s)) { - sys_error (ME, 0, _("%s: stat failed (%s)."), + sys_error (r, 0, _("%s: stat failed (%s)."), fh_get_file_name (r->fh), strerror (errno)); return false; }