diff options
| author | Po Lu | 2022-06-28 05:43:13 +0000 |
|---|---|---|
| committer | Po Lu | 2022-06-28 07:30:02 +0000 |
| commit | 748e6c1e80e7c34cf255e1e8e030dd5414afb5da (patch) | |
| tree | 4ec68e357cbc69379c788c50bd51fe598ab2a023 /src | |
| parent | b78508696b1997ba0eef4288219071994c88e575 (diff) | |
| download | emacs-748e6c1e80e7c34cf255e1e8e030dd5414afb5da.tar.gz emacs-748e6c1e80e7c34cf255e1e8e030dd5414afb5da.zip | |
Automatically detect cyclic lists in some Haiku functions
* src/haikuselect.c (haiku_lisp_to_message): Use FOR_EACH_TAIL
to iterate over message data.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikuselect.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/haikuselect.c b/src/haikuselect.c index 96223902f8c..fe76e09810c 100644 --- a/src/haikuselect.c +++ b/src/haikuselect.c | |||
| @@ -441,10 +441,10 @@ haiku_lisp_to_message (Lisp_Object obj, void *message) | |||
| 441 | int rc; | 441 | int rc; |
| 442 | specpdl_ref ref; | 442 | specpdl_ref ref; |
| 443 | 443 | ||
| 444 | CHECK_LIST (obj); | 444 | tem = obj; |
| 445 | for (tem = obj; CONSP (tem); tem = XCDR (tem)) | 445 | |
| 446 | FOR_EACH_TAIL (tem) | ||
| 446 | { | 447 | { |
| 447 | maybe_quit (); | ||
| 448 | t1 = XCAR (tem); | 448 | t1 = XCAR (tem); |
| 449 | CHECK_CONS (t1); | 449 | CHECK_CONS (t1); |
| 450 | 450 | ||
| @@ -490,9 +490,9 @@ haiku_lisp_to_message (Lisp_Object obj, void *message) | |||
| 490 | signal_error ("Unknown data type", type_sym); | 490 | signal_error ("Unknown data type", type_sym); |
| 491 | 491 | ||
| 492 | CHECK_LIST (t1); | 492 | CHECK_LIST (t1); |
| 493 | for (t2 = XCDR (t1); CONSP (t2); t2 = XCDR (t2)) | 493 | t2 = XCDR (t1); |
| 494 | FOR_EACH_TAIL (t2) | ||
| 494 | { | 495 | { |
| 495 | maybe_quit (); | ||
| 496 | data = XCAR (t2); | 496 | data = XCAR (t2); |
| 497 | 497 | ||
| 498 | if (FIXNUMP (type_sym) || BIGNUMP (type_sym)) | 498 | if (FIXNUMP (type_sym) || BIGNUMP (type_sym)) |