[TCT][packaging/scripts/src/templates][NonACR][apply do-while for the assert macros]
authortaeyoung <ty317.kim@samsung.com>
Mon, 19 Sep 2016 04:38:12 +0000 (13:38 +0900)
committertaeyoung <ty317.kim@samsung.com>
Mon, 19 Sep 2016 04:49:28 +0000 (13:49 +0900)
commitbf3df4d7a90e81d18f86cb40714abcfbf452f459
treeb56f0c0d6564d68dc17a50bc426b79496e63ff35
parent3e57f223a11cad96285c840f3046777dccd43f13
[TCT][packaging/scripts/src/templates][NonACR][apply do-while for the assert macros]

The macros just have "if" statements. Thus the macros
can occur incorrect operation. The following is the example.
The "else" cannot operate properly since there are two "if"
in front of the "else". Thus do-while needs to be added.

   if (condition)
      assert_eq(ret, 0);
   else
      assert_eq(ret, 1);

===>>

   if (condition)
      if (ret != 0) {
         do something;
      }
   else
      if (ret != 1) {
         do something;
      }

Change-Id: I435f15f18aa1e01ad5ddce314dcbda8e0b9fbc0b
Signed-off-by: taeyoung <ty317.kim@samsung.com>
src/common/assert.h