mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Save a couple characters' allocation in esc_for_log
This commit is contained in:
committed by
Nick Mathewson
parent
308457218a
commit
426116113f
@@ -0,0 +1,3 @@
|
||||
o Minor bugfixes
|
||||
- Save a couple bytes in memory allocation every time we escape
|
||||
certain characters in a string. Patch from Florian Zumbiehl.
|
||||
@@ -940,6 +940,9 @@ esc_for_log(const char *s)
|
||||
case '\\':
|
||||
case '\"':
|
||||
case '\'':
|
||||
case '\r':
|
||||
case '\n':
|
||||
case '\t':
|
||||
len += 2;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user