Two more fixes from Jim Brown <jim.brown@miami.edu> for SGI compiler warnings.
authorJeremy Allison <jra@samba.org>
Tue, 1 Jul 2008 22:40:07 +0000 (15:40 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 1 Jul 2008 22:40:07 +0000 (15:40 -0700)
Jeremy.

source/libsmb/clientgen.c
source/smbd/oplock_irix.c

index 2af4383dcdc1f24941d2824fc76acd6a3bb903f3..d6d26e41a69adc012cf55c979f1d2f4937a19eba 100644 (file)
@@ -97,7 +97,12 @@ static ssize_t client_receive_smb(struct cli_state *cli, size_t maxlen)
                        return -1;
                }
 
-               if (len < 0) {
+               /*
+                * I don't believe len can be < 0 with NT_STATUS_OK
+                * returned above, but this check doesn't hurt. JRA.
+                */
+
+               if ((ssize_t)len < 0) {
                        return len;
                }
 
index 788cd04c17d7274988213a464248e2f69124863f..8c287c9836ebad8878f1b3694985952777afc2f8 100644 (file)
@@ -184,7 +184,7 @@ static bool irix_set_kernel_oplock(files_struct *fsp, int oplock_type)
                                 strerror(errno) ));
                } else {
                        DEBUG(5,("irix_set_kernel_oplock: Refused oplock on "
-                                "file %s, fd = %d, file_id = 5s, "
+                                "file %s, fd = %d, file_id = %s, "
                                 "gen_id = %ul. Another process had the file "
                                 "open.\n",
                                 fsp->fsp_name, fsp->fh->fd,