Changeset: b334f99ef5fc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b334f99ef5fc
Modified Files:
        clients/src/mapiclient/dump.c
Branch: Oct2010
Log Message:

Rather than truncate, return original when converting type name to upper case.


diffs (30 lines):

diff -r 3196167ecbc9 -r b334f99ef5fc clients/src/mapiclient/dump.c
--- a/clients/src/mapiclient/dump.c     Wed Sep 15 17:38:31 2010 +0200
+++ b/clients/src/mapiclient/dump.c     Wed Sep 15 17:40:02 2010 +0200
@@ -342,18 +342,19 @@
        return 1;
 }
 
-static char _toupperbuf[64];
-static char *
+static const char *
 toUpper(const char *s)
 {
+       static char toupperbuf[64];
        size_t i;
        size_t len = strlen(s);
-       if (len > 63)
-               len = 63;
+
+       if (len >= sizeof(toupperbuf))
+               return s;       /* too long: it's not *that* important */
        for (i = 0; i < len; i++)
-               _toupperbuf[i] = toupper((int)s[i]);
-       _toupperbuf[i] = '\0';
-       return(_toupperbuf);
+               toupperbuf[i] = toupper((int)s[i]);
+       toupperbuf[i] = '\0';
+       return toupperbuf;
 }
 
 static int dump_column_definition(
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to