Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7de51af5
Commit
7de51af5
authored
Jun 20, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* xfont.c (xfont_match): Avoid need for strlen.
parent
25ed6cc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/ChangeLog
src/ChangeLog
+2
-0
src/xfont.c
src/xfont.c
+1
-3
No files found.
src/ChangeLog
View file @
7de51af5
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.
...
...
src/xfont.c
View file @
7de51af5
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment