upgrade-apply: Modify to check th_get_size
The return value of th_get_size() is int type, which means it can be
negative value. Previously, the lvalue of assignment was size_t, which
is unsigned integer while rvalue is the return value of th_get_size().
If the return value is positive, it is ok since size_t contains the
range of positive range of int type. But if it is negative it can be a
problem.(also it is an error)
To resolve this issue, a code to check if the return value is negative
or not before assigning it to size_t type variable.
Change-Id: I947484daca4722d3783964ffb98ea85255998164
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>