summaryrefslogtreecommitdiff
path: root/source4/torture/raw/pingpong.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 16:46:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:43 -0500
commit98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8 (patch)
tree044b24a249cc2b63c2f69214d7e7da288c170c74 /source4/torture/raw/pingpong.c
parentce0ff008b5c5af931526d14fa6232f8647e0880f (diff)
downloadsamba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.tar.gz
r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
Diffstat (limited to 'source4/torture/raw/pingpong.c')
-rwxr-xr-xsource4/torture/raw/pingpong.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/source4/torture/raw/pingpong.c b/source4/torture/raw/pingpong.c
index 6841253c91e..6d84ff1ae94 100755
--- a/source4/torture/raw/pingpong.c
+++ b/source4/torture/raw/pingpong.c
@@ -52,10 +52,7 @@
#include "torture/util.h"
#include "param/param.h"
-
-
-
-void lock_byte(struct smbcli_state *cli, int fd, int offset, int lock_timeout)
+static void lock_byte(struct smbcli_state *cli, int fd, int offset, int lock_timeout)
{
union smb_lock io;
struct smb_lock_entry lock;
@@ -93,7 +90,7 @@ try_again:
}
}
-void unlock_byte(struct smbcli_state *cli, int fd, int offset)
+static void unlock_byte(struct smbcli_state *cli, int fd, int offset)
{
union smb_lock io;
struct smb_lock_entry lock;
@@ -120,7 +117,7 @@ void unlock_byte(struct smbcli_state *cli, int fd, int offset)
}
}
-void write_byte(struct smbcli_state *cli, int fd, uint8_t c, int offset)
+static void write_byte(struct smbcli_state *cli, int fd, uint8_t c, int offset)
{
union smb_write io;
NTSTATUS status;
@@ -140,7 +137,7 @@ void write_byte(struct smbcli_state *cli, int fd, uint8_t c, int offset)
}
}
-void read_byte(struct smbcli_state *cli, int fd, uint8_t *c, int offset)
+static void read_byte(struct smbcli_state *cli, int fd, uint8_t *c, int offset)
{
union smb_read io;
NTSTATUS status;
@@ -179,7 +176,7 @@ static double end_timer(void)
/*
ping pong
*/
-BOOL torture_ping_pong(struct torture_context *torture)
+bool torture_ping_pong(struct torture_context *torture)
{
const char *fn;
int num_locks;
@@ -194,21 +191,21 @@ BOOL torture_ping_pong(struct torture_context *torture)
uint8_t *val;
int count, loops;
- fn = lp_parm_string(-1, "torture", "filename");
+ fn = lp_parm_string(NULL, "torture", "filename");
if (fn == NULL) {
DEBUG(0,("You must specify the filename using --option=torture:filename=...\n"));
return false;
}
- num_locks = lp_parm_int(-1, "torture", "num_locks", -1);
+ num_locks = lp_parm_int(NULL, "torture", "num_locks", -1);
if (num_locks == -1) {
DEBUG(0,("You must specify num_locks using --option=torture:num_locks=...\n"));
return false;
}
- do_reads = lp_parm_bool(-1, "torture", "read", False);
- do_writes = lp_parm_bool(-1, "torture", "write", False);
- lock_timeout = lp_parm_int(-1, "torture", "lock_timeout", 100000);
+ do_reads = lp_parm_bool(NULL, "torture", "read", false);
+ do_writes = lp_parm_bool(NULL, "torture", "write", false);
+ lock_timeout = lp_parm_int(NULL, "torture", "lock_timeout", 100000);
if (!torture_open_connection(&cli, 0)) {
DEBUG(0,("Could not open connection\n"));