mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
slirp/misc: Use the GLib memory allocation APIs
Here we don't check the return value of malloc() which may fail. Use the g_new() instead, which will abort the program when there is not enough memory. Also, use g_strdup instead of strdup and remove the unnecessary strdup function. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
58ab9e6807
commit
2fd5d86409
3 changed files with 3 additions and 24 deletions
|
@ -72,9 +72,6 @@
|
|||
/* Define if you have strerror */
|
||||
#define HAVE_STRERROR
|
||||
|
||||
/* Define if you have strdup() */
|
||||
#define HAVE_STRDUP
|
||||
|
||||
/* Define according to how time.h should be included */
|
||||
#define TIME_WITH_SYS_TIME 0
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue