mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* xfont.c (xfont_match): Avoid need for strlen.
This commit is contained in:
parent
25ed6cc397
commit
7de51af53b
2 changed files with 3 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* xfont.c (xfont_match): Avoid need for strlen.
|
||||
|
||||
* xfns.c: Don't assume strlen fits in int.
|
||||
(xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
|
||||
|
||||
|
|
|
|||
|
|
@ -594,16 +594,14 @@ xfont_match (Lisp_Object frame, Lisp_Object spec)
|
|||
{
|
||||
if (XGetFontProperty (xfont, XA_FONT, &value))
|
||||
{
|
||||
int len;
|
||||
char *s;
|
||||
|
||||
s = (char *) XGetAtomName (display, (Atom) value);
|
||||
len = strlen (s);
|
||||
|
||||
/* If DXPC (a Differential X Protocol Compressor)
|
||||
Ver.3.7 is running, XGetAtomName will return null
|
||||
string. We must avoid such a name. */
|
||||
if (len > 0)
|
||||
if (*s)
|
||||
{
|
||||
entity = font_make_entity ();
|
||||
ASET (entity, FONT_TYPE_INDEX, Qx);
|
||||
|
|
|
|||
Loading…
Reference in a new issue