Changeset: ef67de6b9138 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef67de6b9138 Modified Files: monetdb5/mal/mal_utils.c Branch: default Log Message:
Don't calculate string size if not needed. diffs (12 lines): diff --git a/monetdb5/mal/mal_utils.c b/monetdb5/mal/mal_utils.c --- a/monetdb5/mal/mal_utils.c +++ b/monetdb5/mal/mal_utils.c @@ -64,7 +64,7 @@ mal_unquote(char *msg) char * mal_quote(const char *msg, size_t size) { - char *s = GDKmalloc(strlen(msg) * 2 + 1); /* we absolutely don't need more than this (until we start producing octal escapes */ + char *s = GDKmalloc(size * 2 + 1); /* we absolutely don't need more than this (until we start producing octal escapes */ char *t = s; if ( s == NULL) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list