diff options
| author | Paul Eggert | 2011-06-20 18:40:45 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-20 18:40:45 -0700 |
| commit | 7de51af53b40c4fcaa4369feffad11e9db11fbe0 (patch) | |
| tree | b3387f8457fcd3fdcf819b3b24259d0371a8259d /src/xfont.c | |
| parent | 25ed6cc39748008e8f95a247d3ece3e063fcc92e (diff) | |
| download | emacs-7de51af53b40c4fcaa4369feffad11e9db11fbe0.tar.gz emacs-7de51af53b40c4fcaa4369feffad11e9db11fbe0.zip | |
* xfont.c (xfont_match): Avoid need for strlen.
Diffstat (limited to 'src/xfont.c')
| -rw-r--r-- | src/xfont.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/xfont.c b/src/xfont.c index 5dd6aae3846..2c3ca911623 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -594,16 +594,14 @@ xfont_match (Lisp_Object frame, Lisp_Object spec) | |||
| 594 | { | 594 | { |
| 595 | if (XGetFontProperty (xfont, XA_FONT, &value)) | 595 | if (XGetFontProperty (xfont, XA_FONT, &value)) |
| 596 | { | 596 | { |
| 597 | int len; | ||
| 598 | char *s; | 597 | char *s; |
| 599 | 598 | ||
| 600 | s = (char *) XGetAtomName (display, (Atom) value); | 599 | s = (char *) XGetAtomName (display, (Atom) value); |
| 601 | len = strlen (s); | ||
| 602 | 600 | ||
| 603 | /* If DXPC (a Differential X Protocol Compressor) | 601 | /* If DXPC (a Differential X Protocol Compressor) |
| 604 | Ver.3.7 is running, XGetAtomName will return null | 602 | Ver.3.7 is running, XGetAtomName will return null |
| 605 | string. We must avoid such a name. */ | 603 | string. We must avoid such a name. */ |
| 606 | if (len > 0) | 604 | if (*s) |
| 607 | { | 605 | { |
| 608 | entity = font_make_entity (); | 606 | entity = font_make_entity (); |
| 609 | ASET (entity, FONT_TYPE_INDEX, Qx); | 607 | ASET (entity, FONT_TYPE_INDEX, Qx); |