diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2010-03-05 14:34:03 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2010-03-05 14:34:03 (GMT) |
| commit | 5f013ba3b519ea1ca4827062e8169dcfc3d44401 (patch) | |
| tree | f2dc6d4861ea238a538f41c4306249dad1ac3ea5 /generic/tclScan.c | |
| parent | d73c5278bda74da35fb02537be0a3e3ad238e017 (diff) | |
| download | tcl-5f013ba3b519ea1ca4827062e8169dcfc3d44401.zip tcl-5f013ba3b519ea1ca4827062e8169dcfc3d44401.tar.gz tcl-5f013ba3b519ea1ca4827062e8169dcfc3d44401.tar.bz2 | |
Code Audit results:
* use do { ... } while (0) in macros
* avoid shadowing one local variable with another
* use clearer 'foo.bar++;' instead of '++foo.bar;' where result not
required (i.e., semantically equivalent)
* follow Engineering Manual rules on spacing and declarations
Diffstat (limited to 'generic/tclScan.c')
| -rw-r--r-- | generic/tclScan.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index a9be080..6d23950 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.34 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.35 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -449,14 +449,10 @@ ValidateFormat( TCL_STATIC); goto error; default: - { - char buf[TCL_UTF_MAX+1]; - - buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; - Tcl_AppendResult(interp, "bad scan conversion character \"", - buf, "\"", NULL); - goto error; - } + buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; + Tcl_AppendResult(interp, "bad scan conversion character \"", buf, + "\"", NULL); + goto error; } if (!(flags & SCAN_SUPPRESS)) { if (objIndex >= nspace) { |
