Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

起動後,<C-d> を入力するとコアダンプになるバグに関連する修正 #4

Merged
merged 2 commits into from
Oct 23, 2019

Conversation

jsaka1259
Copy link
Owner

@jsaka1259 jsaka1259 commented Oct 23, 2019

概要

./build/msh を実行後, を入力すると コアダンプになるバグの修正,およびそれに関連したいくつかの修正.

変更点

  • コマンドラインバッファ変数 line とコマンド構造体 cmd をグローバル変数からローカル変数に変更し,引数で受け渡しするように変更した.
    こうすることで,メモリの確保と解放を変数宣言した関数で一括で行うことができ,メモリの解放漏れ等のリスクが低減した.
  • [opt] コーディングスタイルを統一した
  • [opt] help コマンドと command not found の出力に色を付けた
  • [opt] すべてのコードで msh.hinclude していたが,コードの独立性を向上させるため,コード毎に必要なヘッダーを include するようにした
  • [opt] strnlen から strlen を使用するようにした

Related Issue

#3

@jsaka1259 jsaka1259 added the bug label Oct 23, 2019
@jsaka1259 jsaka1259 self-assigned this Oct 23, 2019
@jsaka1259 jsaka1259 changed the title 起動後,<C-d> を入力するとコアダンプになるバグの修正 起動後,<C-d> を入力するとコアダンプになるバグに関連する修正 Oct 23, 2019
@jsaka1259 jsaka1259 merged commit 4985d1f into master Oct 23, 2019
@jsaka1259 jsaka1259 deleted the feature/fix-coredump-ctrl-d branch October 23, 2019 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant