diff options
| -rw-r--r-- | src/xfns.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c index d610c839bfc..67db461a379 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3917,11 +3917,12 @@ xic_string_conversion_callback (XIC ic, XPointer client_data, | |||
| 3917 | return; | 3917 | return; |
| 3918 | 3918 | ||
| 3919 | failure: | 3919 | failure: |
| 3920 | /* Return a string of length 0 using the C library malloc. This | 3920 | /* Return a string of length 0 using the C library malloc (1) |
| 3921 | (not malloc (0), to pacify gcc -Walloc-size). This | ||
| 3921 | assumes XFree is able to free data allocated with our malloc | 3922 | assumes XFree is able to free data allocated with our malloc |
| 3922 | wrapper. */ | 3923 | wrapper. */ |
| 3923 | call_data->text->length = 0; | 3924 | call_data->text->length = 0; |
| 3924 | call_data->text->string.mbs = malloc (0); | 3925 | call_data->text->string.mbs = malloc (1); |
| 3925 | } | 3926 | } |
| 3926 | 3927 | ||
| 3927 | #endif /* HAVE_X_I18N */ | 3928 | #endif /* HAVE_X_I18N */ |