MCPcopy Create free account
hub / github.com/coreutils/coreutils / neg_to_zero

Function neg_to_zero

src/stat.c:1038–1045  ·  view source on GitHub ↗

Map a TS with negative TS.tv_nsec to {0,0}. */

Source from the content-addressed store, hash-verified

1036
1037/* Map a TS with negative TS.tv_nsec to {0,0}. */
1038static inline struct timespec
1039neg_to_zero (struct timespec ts)
1040{
1041 if (0 <= ts.tv_nsec)
1042 return ts;
1043 struct timespec z = {0};
1044 return z;
1045}
1046
1047/* Set the quoting style default if the environment variable
1048 QUOTING_STYLE is set. */

Callers 1

print_statFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected