mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Global: replaces NULL to nullptr
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user