aboutsummaryrefslogtreecommitdiffstats
path: root/src/casefiddle.c
diff options
context:
space:
mode:
authorEli Zaretskii2019-08-12 17:39:09 +0300
committerEli Zaretskii2019-08-12 17:39:09 +0300
commit2b329ed420eb15f6738edd402697ac2876b2aa61 (patch)
treee0f0a19c6c32e7733f8300ecd4522c1c5ada59eb /src/casefiddle.c
parentdbae38efc22e117c20f6cd9bfd8300d692055c70 (diff)
downloademacs-2b329ed420eb15f6738edd402697ac2876b2aa61.tar.gz
emacs-2b329ed420eb15f6738edd402697ac2876b2aa61.zip
; Add commentary to recent changes
* src/image.c (png_load_body): * src/editfns.c (styled_format): * src/casefiddle.c (do_casify_multibyte_string): * src/alloc.c (free_cons): Comment why we use a signed temporary integer variable. (Bug#37006)
Diffstat (limited to 'src/casefiddle.c')
-rw-r--r--src/casefiddle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 6fcb5852141..741973e40af 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -265,6 +265,8 @@ do_casify_multibyte_string (struct casing_context *ctx, Lisp_Object obj)
265 265
266 ptrdiff_t size = SCHARS (obj), n; 266 ptrdiff_t size = SCHARS (obj), n;
267 USE_SAFE_ALLOCA; 267 USE_SAFE_ALLOCA;
268 /* Use a temporary signed variable, since otherwise INT_ADD_WRAPV
269 might incorrectly return non-zero. */
268 ptrdiff_t casing_str_buf_size = sizeof (struct casing_str_buf); 270 ptrdiff_t casing_str_buf_size = sizeof (struct casing_str_buf);
269 if (INT_MULTIPLY_WRAPV (size, MAX_MULTIBYTE_LENGTH, &n) 271 if (INT_MULTIPLY_WRAPV (size, MAX_MULTIBYTE_LENGTH, &n)
270 || INT_ADD_WRAPV (n, casing_str_buf_size, &n)) 272 || INT_ADD_WRAPV (n, casing_str_buf_size, &n))