projects
/
platform
/
core
/
api
/
user-awareness.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef5fee6
)
Remove redundant g_strlcpy operation in ua_device_set_mac_address()
author
Nishant Chaprana
<n.chaprana@samsung.com>
Mon, 7 Oct 2019 12:28:23 +0000
(17:58 +0530)
committer
saerome.kim
<saerome.kim@samsung.com>
Tue, 8 Oct 2019 00:55:03 +0000
(09:55 +0900)
Change-Id: I08371368c022492f9e922486efa768441a2083c4
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
src/user-awareness-device.c
patch
|
blob
|
history
diff --git
a/src/user-awareness-device.c
b/src/user-awareness-device.c
index c6a97fc7bb8005eafbc17a84af428822a28664d7..7b71a130ed9e3bf9da76f8145867257347b4c802 100755
(executable)
--- a/
src/user-awareness-device.c
+++ b/
src/user-awareness-device.c
@@
-505,12
+505,11
@@
int ua_device_set_mac_address(
g_free(device->mac);
device->mac = g_malloc0(UA_MAC_ADDRESS_STRING_LEN);
- if (device->mac){
- g_strlcpy(device->mac, mac_address, UA_MAC_ADDRESS_STRING_LEN);
- } else {
+ if (device->mac == NULL) {
UA_ERR("Failt to allocate memory");
return UA_ERROR_OUT_OF_MEMORY;
}
+
g_strlcpy(device->mac, mac_address, UA_MAC_ADDRESS_STRING_LEN);
FUNC_EXIT;