diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-03-14 12:02:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-03-14 12:02:02 -0700 |
commit | 488bc2f599aa6a2be792e36033ce087a9c5c7577 (patch) | |
tree | 41e9ebb73fc761ed60e8d988a0dadd10ebd7f3b6 /ftw.c | |
parent | d784d188d5da7c5e8d7253b7273c8e71f86485bc (diff) | |
download | txr-488bc2f599aa6a2be792e36033ce087a9c5c7577.tar.gz txr-488bc2f599aa6a2be792e36033ce087a9c5c7577.tar.bz2 txr-488bc2f599aa6a2be792e36033ce087a9c5c7577.zip |
lib: fix neglect to use self variable.
* arith.c (toint): Use self instead of repeating function name
in diagnostic.
* ftw.c (ftw_wrap): Likewise.
* glib.c (glow_wrap): Likewise.
* rand.c (make_random_state, random): Likewise.
* lib.c (nreverse, reverse, remove_if, int_str, less, chr_str,
chr_str_set, unintern, rehome_sym, in): Likewise.
(vector, obj_print_impl): Pass self to helper function instead
of repeating identical literal.
Diffstat (limited to 'ftw.c')
-rw-r--r-- | ftw.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -93,8 +93,9 @@ val ftw_wrap(val dirpath, val fn, val flags_in, val nopenfd_in) val self = lit("ftw"); if (s_callback) { - uw_throwf(error_s, lit("ftw: cannot be re-entered from " - "ftw callback"), nao); + uw_throwf(error_s, + lit("~a: cannot be re-entered from ~a callback"), + self, self, nao); } else if (dirpath == nil) { return t; } else if (consp(dirpath)) { @@ -128,8 +129,8 @@ val ftw_wrap(val dirpath, val fn, val flags_in, val nopenfd_in) case -1: { int eno = errno; - uw_throwf(errno_to_file_error(eno), lit("ftw ~a: ~d/~s"), - dirpath, num(eno), errno_to_str(eno), nao); + uw_throwf(errno_to_file_error(eno), lit("~a ~a: ~d/~s"), + self, dirpath, num(eno), errno_to_str(eno), nao); } default: return num(res); |