Global: replaces NULL to nullptr

This commit is contained in:
李通洲
2026-07-10 18:08:04 +08:00
parent 873454191f
commit ba18705d2e
387 changed files with 2411 additions and 2411 deletions
+4 -4
View File
@@ -4,15 +4,15 @@
const char* ffDetectMouse(FFlist* devices /* List of FFMouseDevice */) {
FF_AUTO_CLOSE_DIR DIR* dirp = opendir("/sys/class/input/");
if (dirp == NULL) {
return "opendir(\"/sys/class/input/\") == NULL";
if (dirp == nullptr) {
return "opendir(\"/sys/class/input/\") == nullptr";
}
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateS("/sys/class/input/");
uint32_t baseLen = path.length;
struct dirent* entry;
while ((entry = readdir(dirp)) != NULL) {
while ((entry = readdir(dirp)) != nullptr) {
if (!ffStrStartsWith(entry->d_name, "mouse")) {
continue;
}
@@ -41,5 +41,5 @@ const char* ffDetectMouse(FFlist* devices /* List of FFMouseDevice */) {
ffStrbufSubstrBefore(&path, baseLen);
}
return NULL;
return nullptr;
}