On Sun, Jan 28, 2018 at 01:39:12AM +0100, Petr Kulhavy wrote:
> The compiler is right. If do_pps_loop() is called with node->phc_readings==0
> , phc_ts and phc_offset are used uninitialized.

Are you sure the compiler is right?

In main() we have:

        struct node node = {
                .sanity_freq_limit = 200000000,
                .servo_type = CLOCK_SERVO_PI,
                .phc_readings = 5,
                .phc_interval = 1.0,
                .kernel_leap = 1,
        };

and then

                case 'N':
                        if (get_arg_val_i(c, optarg, &node.phc_readings, 1, 
INT_MAX))
                                goto end;

thus (1 <= phc_readings <= INT_MAX).

Thanks,
Richard



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to