MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dirent_terminate

Function dirent_terminate

freebsd/sys/dirent.h:133–141  ·  view source on GitHub ↗

* Ensure that padding bytes are zeroed and that the name is NUL-terminated. */

Source from the content-addressed store, hash-verified

131 * Ensure that padding bytes are zeroed and that the name is NUL-terminated.
132 */
133static inline void
134dirent_terminate(struct dirent *dp)
135{
136
137 dp->d_pad0 = 0;
138 dp->d_pad1 = 0;
139 memset(dp->d_name + dp->d_namlen, 0,
140 dp->d_reclen - (__offsetof(struct dirent, d_name) + dp->d_namlen));
141}
142#endif
143
144#endif /* !_SYS_DIRENT_H_ */

Callers 2

zfs_readdirFunction · 0.85
mqfs_readdirFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected