Prettify a strncpy 13/193913/2
authorIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Tue, 27 Nov 2018 09:11:38 +0000 (10:11 +0100)
committerIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Tue, 27 Nov 2018 11:14:29 +0000 (12:14 +0100)
Change-Id: Ieb75766f5412ed620ff169f14a0a2e8c0baa8690
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
log/ta_log.c

index dfb34c7..3fd6c60 100644 (file)
@@ -87,9 +87,8 @@ void setDebugLogLevelNum(const usr_log_level __level)
 void getDebugLogName(char* __name)
 {
        if(__name != NULL) {
-               int length = strlen(log_label);
+               int length = strlen(log_label) + 1;
                strncpy(__name, log_label, length);
-               __name[length] = '\0';
        }
 }