[Example/CustomFilterScaler] Fix coverity analysis error 1029511
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 20 Sep 2018 07:29:53 +0000 (16:29 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Thu, 20 Sep 2018 08:26:46 +0000 (17:26 +0900)
Unsigned variables cannot be less than 0.
Do not check if they are less than 0.

Addresses one item of #558.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
nnstreamer_example/custom_example_scaler/nnstreamer_customfilter_example_scaler.c

index 908d679..ff57c32 100644 (file)
@@ -70,15 +70,11 @@ pt_init (const GstTensorFilterProperties * prop)
     gchar **strv = g_strsplit_set (data->property, s, 3);
     if (strv[0] != NULL) {
       data->new_x = (uint32_t) g_ascii_strtoll (strv[0], NULL, 10);
-      if (data->new_x < 0)
-        data->new_x = 0;
     } else {
       data->new_x = 0;
     }
     if (strv[1] != NULL) {
       data->new_y = (uint32_t) g_ascii_strtoll (strv[1], NULL, 10);
-      if (data->new_y < 0)
-        data->new_y = 0;
     } else {
       data->new_y = 0;
     }