delete from list fix 09/29709/2
authorOleksandr Dmytrenko <o.dmytrenko@samsung.com>
Tue, 20 Aug 2019 13:44:02 +0000 (16:44 +0300)
committerAleksey Volkov <a.volkov@samsung.com>
Wed, 21 Aug 2019 10:32:29 +0000 (10:32 +0000)
error C2530: '_tmp' : references must be initialized fix

Change-Id: Ia4ddda1ac8d5d1322452534dbf42f93ae9dac949
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
resource/c_common/utlist.h

index cc0b997..7026506 100644 (file)
@@ -350,11 +350,10 @@ do {
 
 #define LL_DELETE2(head,del,next)                                                              \
 do {                                                                                           \
-  LDECLTYPE(head) _tmp;                                                                        \
   if ((head) == (del)) {                                                                       \
     (head)=(head)->next;                                                                       \
   } else {                                                                                     \
-    _tmp = (head);                                                                             \
+    LDECLTYPE(head) _tmp = (head);                                                             \
     while (_tmp->next && (_tmp->next != (del))) {                                              \
       _tmp = _tmp->next;                                                                       \
     }                                                                                          \