> > -    fprintf(filep_pidfile, "%d\n", _getpid());
> > +    fprintf(filep_pidfile, "%d\n", getpid());
> 
> This seems reasonable to me, except that usual practice would be more like
> this:
>     fprintf(filep_pidfile, "%ld\n", (long int) getpid()); because pid_t might 
> be
> short or int or long.
[Alin Serdean] Thanks for the review Ben, I totally missed that.
Although being MSFT specific if we replace getpid with GetCurrentProcessId 
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms683180(v=vs.85).aspx)
 and from includes:
typedef unsigned long       DWORD;
I'm wondering if we should switch it to `%lu` and `(unsigned long)`. 
What do you think?

Thanks,
Alin.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to