Commit 120ff84e authored by Sebastian Oeste's avatar Sebastian Oeste
Browse files

fix: use nullptr instead of NULL

* nullptr provides more type safetieness.
parent ead42dd2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -82,12 +82,12 @@ int adafs_readdir(const char* p, void* buf, fuse_fill_dir_t filler, off_t offset
        return 1; // XXX problemo dedected deal with it later (I mean me)

    // visualizing current and parent dir
    filler(buf, ".", NULL, 0, FUSE_FILL_DIR_PLUS);
    filler(buf, "..", NULL, 0, FUSE_FILL_DIR_PLUS);
    filler(buf, ".", nullptr, 0, FUSE_FILL_DIR_PLUS);
    filler(buf, "..", nullptr, 0, FUSE_FILL_DIR_PLUS);
    for (auto& dentry : *dentries) {
        // XXX I have no idea what the last parameter really does...
        ADAFS_DATA->logger->debug("readdir entries: dentry: {}", dentry);
        filler(buf, dentry.c_str(), NULL, 0, FUSE_FILL_DIR_PLUS);
        filler(buf, dentry.c_str(), nullptr, 0, FUSE_FILL_DIR_PLUS);
    }

    return 0;
+2 −2
Original line number Diff line number Diff line
@@ -117,9 +117,9 @@ int main(int argc, char* argv[]) {
    spdlog::set_level(spdlog::level::off);
#endif
    //extract the rootdir from argv and put it into rootdir of adafs_data
    a_data->rootdir = string(realpath(argv[argc - 2], NULL));
    a_data->rootdir = string(realpath(argv[argc - 2], nullptr));
    argv[argc - 2] = argv[argc - 1];
    argv[argc - 1] = NULL;
    argv[argc - 1] = nullptr;
    argc--;
    //set all paths
    a_data->inode_path = a_data->rootdir + "/meta/inodes"s;