Correct compilation errors
Fix compilation errors found with later gcc version during integration
unit tests.
Resolves openbmc/phosphor-host-ipmid#101
Change-Id: I35c5433f03521a877fd09748b8262d6172d21535
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 4332f81..66a8cdd 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -124,7 +124,7 @@
goto finish;
}
- asprintf(buf, "%s", temp_buf);
+ *buf = strdup(temp_buf);
/* *buf = (char*) malloc(strlen(temp_buf));
if (*buf) {
strcpy(*buf, temp_buf);
@@ -1070,4 +1070,3 @@
ipmi_register_callback(NETFUN_CHASSIS, IPMI_CMD_SET_SYS_BOOT_OPTIONS, NULL,
ipmi_chassis_set_sys_boot_options, PRIVILEGE_OPERATOR);
}
-