diff options
| author | Stefan Kangas | 2024-07-20 15:12:50 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2024-07-20 15:12:50 +0200 |
| commit | 2f875ead59abe16c4559d26883ff1db524fa22f7 (patch) | |
| tree | f1b41ba510b10c4c5499074d227aade473f8ac84 /src | |
| parent | b21e749a7c67614110c168299e9b36ac27e9f97a (diff) | |
| download | emacs-2f875ead59abe16c4559d26883ff1db524fa22f7.tar.gz emacs-2f875ead59abe16c4559d26883ff1db524fa22f7.zip | |
Avoid magic values in xfont_list
* src/xfont.c (xfont_list): Avoid magic values.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xfont.c b/src/xfont.c index b112bb4fb39..e439b954c5e 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -487,9 +487,9 @@ xfont_list (struct frame *f, Lisp_Object spec) | |||
| 487 | if (NILP (list) && NILP (registry)) | 487 | if (NILP (list) && NILP (registry)) |
| 488 | { | 488 | { |
| 489 | /* Try iso10646-1 */ | 489 | /* Try iso10646-1 */ |
| 490 | char *r = name + len - 9; /* 9 == strlen (iso8859-1) */ | 490 | char *r = name + len - sizeof "iso8859-1" - 1; |
| 491 | 491 | ||
| 492 | if (r - name + 10 < 256) /* 10 == strlen (iso10646-1) */ | 492 | if (r - name + sizeof "iso10646-1" - 1 < 256) |
| 493 | { | 493 | { |
| 494 | strcpy (r, "iso10646-1"); | 494 | strcpy (r, "iso10646-1"); |
| 495 | list = xfont_list_pattern (display, name, Qiso10646_1, script); | 495 | list = xfont_list_pattern (display, name, Qiso10646_1, script); |