qt5_msgbox: fix condition for checking empty message
authorJihye Won <jihye.won1@samsung.com>
Fri, 13 Nov 2015 02:06:34 +0000 (11:06 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 13 Nov 2015 05:39:08 +0000 (14:39 +0900)
It is simple way to check whether message[1] is NULL
instead of checking the length of the message is 1.
Also, the level of error log is changed from ERROR into WARN.

Change-Id: I9f65e7ed037ee92fcb017255455e2e68dbc45cfa
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
tizen/src/util/qt5_error_report.c

index dacc5a1614720e05ef40a32c75f000333c0e8c32..e3ff10c3ac4c17f363a6ae93c3d07b2064430349 100644 (file)
@@ -67,8 +67,8 @@ void start_qt5_msgbox(qt5_msgbox_icon icon, const char *message)
 {
     INFO("qt5_msgbox starts... \n");
 
-    if (message[0] == '\n' && strnlen(message, MAX_MESSAGE_LEN) == 1) {
-        ERR("The message has only a new-line character. \n" );
+    if (message[0] == '\n' && message[1] == '\0') {
+        WARN("The message has only a new-line character. \n" );
         return;
     }