diff --git a/inc/winfsp/winfsp.hpp b/inc/winfsp/winfsp.hpp index c25bce3c..3db553bc 100644 --- a/inc/winfsp/winfsp.hpp +++ b/inc/winfsp/winfsp.hpp @@ -475,8 +475,8 @@ class FileSystemHost { public: /* ctor/dtor */ - FileSystemHost(FileSystemBase *FileSystem) : - _VolumeParams(), _FileSystemPtr(0), _FileSystem(FileSystem) + FileSystemHost(FileSystemBase &FileSystem) : + _VolumeParams(), _FileSystemPtr(0), _FileSystem(&FileSystem) { Initialize(); _VolumeParams.UmFileContextIsFullContext = 1; @@ -721,9 +721,9 @@ public: { return _FileSystemPtr; } - FileSystemBase *FileSystem() + FileSystemBase &FileSystem() { - return _FileSystem; + return *_FileSystem; } static NTSTATUS SetDebugLogFile(PWSTR FileName) { diff --git a/tst/passthrough-cpp/passthrough-cpp.cpp b/tst/passthrough-cpp/passthrough-cpp.cpp index 5860185d..ec6e4d9c 100644 --- a/tst/passthrough-cpp/passthrough-cpp.cpp +++ b/tst/passthrough-cpp/passthrough-cpp.cpp @@ -874,7 +874,7 @@ static ULONG wcstol_deflt(wchar_t *w, ULONG deflt) return L'\0' != w[0] && L'\0' == *endp ? ul : deflt; } -PtfsService::PtfsService() : Service(L"" PROGNAME), _Ptfs(), _Host(&_Ptfs) +PtfsService::PtfsService() : Service(L"" PROGNAME), _Ptfs(), _Host(_Ptfs) { }