> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of David Hunt
> +             TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {

>               return 0;

[Reshma]:  Do we need to return -1 here and in other failure scenarios below.

>       }
>       f = fopen(fullpath, "r");
>       if (f == NULL) {
> -             return 0;
> +             if (snprintf(fullpath, sizeof(fullpath),
> +                     TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
> +                     return 0;
> +             }
> +             f = fopen(fullpath, "r");
> +             if (f == NULL) {
> +                     return 0;
> +             }
>       }
>       for (i = 0; i < MAX_LOOP; i++) {
>               fflush(f);
> --
> 2.17.1

Reply via email to