AlexChen fae0b0de71 util: Remove redundant checks in the openpty()
As we can see from the following function call stack, amaster and aslave
can not be NULL: char_pty_open() -> qemu_openpty_raw() -> openpty().
In addition, according to the API specification for openpty():
https://www.gnu.org/software/libc/manual/html_node/Pseudo_002dTerminal-Pairs.html,
the arguments name, termp and winp can all be NULL, but arguments amaster or aslave
can not be NULL.
Finally, amaster and aslave has been dereferenced at the beginning of the openpty().
So the checks on amaster and aslave in the openpty() are redundant. Remove them.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <5F9FE5B8.1030803@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-09-15 14:42:48 +02:00
..
2021-07-21 13:47:50 +01:00
2020-01-06 18:41:32 +04:00
2021-07-06 08:33:51 +02:00
2019-09-11 08:46:17 +02:00
2021-07-09 18:20:27 +02:00
2020-12-10 17:16:44 +01:00
2021-06-13 17:42:40 -07:00
2021-07-09 18:42:46 +02:00
2018-12-20 10:29:08 +01:00
2021-07-09 18:20:27 +02:00
2021-04-30 12:27:47 +02:00
2018-08-24 20:26:37 +02:00
2021-04-01 15:27:44 +04:00