summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-21 13:43:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-21 13:43:08 -0700
commit3de73e5ee550ff9715e3c6034b2575a4386cf331 (patch)
treec50e0820e878773e95e9e113b8f56d0e0d59c9a6 /src/xterm.c
parent2606c57bbfd45c35357483e9fa39035ee8953cab (diff)
downloademacs-3de73e5ee550ff9715e3c6034b2575a4386cf331.tar.gz
* xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index f40d260dabe..c1134521c71 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8084,7 +8084,7 @@ xim_initialize (struct x_display_info *dpyinfo, char *resource_name)
{
#ifdef HAVE_X11R6_XIM
struct xim_inst_t *xim_inst;
- int len;
+ ptrdiff_t len;
xim_inst = (struct xim_inst_t *) xmalloc (sizeof (struct xim_inst_t));
dpyinfo->xim_callback_data = xim_inst;
@@ -9720,8 +9720,8 @@ same_x_server (const char *name1, const char *name2)
{
int seen_colon = 0;
const char *system_name = SSDATA (Vsystem_name);
- int system_name_length = strlen (system_name);
- int length_until_period = 0;
+ ptrdiff_t system_name_length = SBYTES (Vsystem_name);
+ ptrdiff_t length_until_period = 0;
while (system_name[length_until_period] != 0
&& system_name[length_until_period] != '.')