Fix coverity CID 930. Pointer check can never be null here.
[ira/wip.git] / source3 / smbd / trans2.c
index d1f2e7ff18a3dea7cf543f61060f0c4327fe1ddd..cb76deb90ae31bd3ebd0f51c6a6459d12415063f 100644 (file)
@@ -4105,7 +4105,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
           I think this causes us to fail the IFSKIT
           BasicFileInformationTest. -tpot */
        file_index =  ((sbuf.st_ex_ino) & UINT32_MAX); /* FileIndexLow */
-       file_index |= ((sbuf.st_ex_dev) & UINT32_MAX) << 32; /* FileIndexHigh */
+       file_index |= ((uint64_t)((sbuf.st_ex_dev) & UINT32_MAX)) << 32; /* FileIndexHigh */
 
        switch (info_level) {
                case SMB_INFO_STANDARD:
@@ -4806,7 +4806,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
 
                        /* We know this name is ok, it's already passed the checks. */
 
-               } else if(fsp && (fsp->is_directory || fsp->fh->fd == -1)) {
+               } else if(fsp->is_directory || fsp->fh->fd == -1) {
                        /*
                         * This is actually a QFILEINFO on a directory
                         * handle (returned from an NT SMB). NT5.0 seems
@@ -7244,7 +7244,7 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
 
                case SMB_SET_FILE_UNIX_HLINK:
                {
-                       if (fsp || smb_fname == NULL) {
+                       if (fsp) {
                                /* We must have a pathname for this. */
                                return NT_STATUS_INVALID_LEVEL;
                        }