Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Linuxでコードを実行しています。strchr()関数にNULLが渡されると、プログラムが中止されるのがわかります。これは、AIXで実行している場合は発生しないようです。
strchr()の動作にこの違いがある理由を誰かが知ることができますか?
ありがとう
strchr() の仕様では、NULL が渡されたときの「正しい」動作が指定されていないため、実装が異なれば自由に実装できます。(ちょっと興味があります: NULL が渡された場合、AIX バージョンは何を返しますか?)