aboutsummaryrefslogtreecommitdiff
path: root/slirp/slirp_config.h
diff options
context:
space:
mode:
authorzhanghailiang <zhang.zhanghailiang@huawei.com>2014-08-19 16:30:17 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2014-08-24 13:16:32 +0400
commit2fd5d864099dd38b43b595e9e3375dad2f76049b (patch)
tree3ad0abcf5c4c34314e36096f96b7537fcee39e63 /slirp/slirp_config.h
parent58ab9e680731ffd1793a7957ab8523f1dca18d05 (diff)
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>
Diffstat (limited to 'slirp/slirp_config.h')
-rw-r--r--slirp/slirp_config.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h
index 18db45c8e4..896d8022eb 100644
--- a/slirp/slirp_config.h
+++ b/slirp/slirp_config.h
@@ -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