// struct __sfileext (see fileext.h).
void flockfile(FILE* fp) {
- if (fp != NULL) {
+ if (fp != nullptr) {
pthread_mutex_lock(&_FLOCK(fp));
}
}
int ftrylockfile(FILE* fp) {
// The specification for ftrylockfile() says it returns 0 on success,
// or non-zero on error. So return an errno code directly on error.
- if (fp == NULL) {
+ if (fp == nullptr) {
return EINVAL;
}
}
void funlockfile(FILE* fp) {
- if (fp != NULL) {
+ if (fp != nullptr) {
pthread_mutex_unlock(&_FLOCK(fp));
}
}