This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] time: Introduce function to check correctness of nanoseconds value


On 10/24/19 3:03 PM, Lukasz Majewski wrote:

Doesn't glibc prefer 'long int' to 'long'?

I've used the type from struct timespec definition (long   tv_nsec;)

I can change it to long int if preferred.

Yes, that's the preferred style. See:

https://sourceware.org/glibc/wiki/Style_and_Conventions#Implicit_int

The question is if we do prefer ns < 1000000000 or ns <= 999999999 ?

I mildly prefer the former, to remind the reader that there are one billion valid values.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]