• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ttyrecのfork. Original: http://0xcc.net/ttyrec/


Commit MetaInfo

修订版1a8209a12c7ec98a4d3d72d248c8001a46f66437 (tree)
时间2019-12-10 12:09:35
作者IWAMOTO Kouichi <sue@iwmt...>
CommiterIWAMOTO Kouichi

Log Message

wait3() の第一引数を常に int 型の変数を使うようにした

以下の理由から、status の型を常に int に変更した
・SVR4以外でも union wait が定義されていない OS が増えた
・int と union wait の記憶域のサイズは同じ
・status は wait3() が値を格納するだけで、その値は使っていない

-> union wait としてアクセスする事は無い

更改概述

差异

--- a/ttyrec.c
+++ b/ttyrec.c
@@ -203,15 +203,11 @@ doinput()
203203 void
204204 finish()
205205 {
206-#if defined(SVR4)
207206 int status;
208-#else /* !SVR4 */
209- union wait status;
210-#endif /* !SVR4 */
211207 register int pid;
212208 register int die = 0;
213209
214- while ((pid = wait3((int *)&status, WNOHANG, 0)) > 0)
210+ while ((pid = wait3(&status, WNOHANG, 0)) > 0)
215211 if (pid == child)
216212 die = 1;
217213