diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-01-23 09:36:29 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-01-25 21:05:41 +0000 |
commit | 5618105004bf4ccde0fd31ea48a2b760c9adfc0f (patch) | |
tree | 6bb3b19c202ce4b0402888d466f64af8eda4a528 /chassishandler.cpp | |
parent | 0573237f4521a0087153cded38814461c8978262 (diff) | |
download | phosphor-host-ipmid-5618105004bf4ccde0fd31ea48a2b760c9adfc0f.tar.gz phosphor-host-ipmid-5618105004bf4ccde0fd31ea48a2b760c9adfc0f.zip |
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>
Diffstat (limited to 'chassishandler.cpp')
-rw-r--r-- | chassishandler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chassishandler.cpp b/chassishandler.cpp index 4332f81..66a8cdd 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp @@ -124,7 +124,7 @@ int dbus_get_property(const char *name, char **buf) 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 @@ void register_netfn_chassis_functions() ipmi_register_callback(NETFUN_CHASSIS, IPMI_CMD_SET_SYS_BOOT_OPTIONS, NULL, ipmi_chassis_set_sys_boot_options, PRIVILEGE_OPERATOR); } - |