summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-03-05 19:42:15 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-03-05 19:42:15 +0100
commit63036a6f3380652c0cb54627bdeabcd212fa2f8c (patch)
tree90194f23cb1e6ca483e7773233c326a9b705f85f /source3/torture
parentd41d580c600e3228ff8fee5c16c47580f661a240 (diff)
parent932c287a406048759fa1ac4bf86e29d96991ded1 (diff)
downloadsamba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.gz
samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.bz2
samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3482cd9b0e81bbc801f1cec33fca82fc45a3ddef)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/cmd_vfs.c3
-rw-r--r--source3/torture/samtest.h37
-rw-r--r--source3/torture/smbiconv.c9
3 files changed, 6 insertions, 43 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 82a28bd868..9359b58599 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -842,7 +842,6 @@ static NTSTATUS cmd_ftruncate(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int ar
static NTSTATUS cmd_lock(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
- bool ret;
int fd;
int op;
long offset;
@@ -914,7 +913,7 @@ static NTSTATUS cmd_lock(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
printf("lock: debug lock(fd=%d, op=%d, offset=%ld, count=%ld, type=%d))\n", fd, op, offset, count, type);
- if ((ret = SMB_VFS_LOCK(vfs->files[fd], op, offset, count, type)) == False) {
+ if (SMB_VFS_LOCK(vfs->files[fd], op, offset, count, type) == False) {
printf("lock: error=%d (%s)\n", errno, strerror(errno));
return NT_STATUS_UNSUCCESSFUL;
}
diff --git a/source3/torture/samtest.h b/source3/torture/samtest.h
deleted file mode 100644
index 5cde3fadb5..0000000000
--- a/source3/torture/samtest.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- SAM module tester
-
- Copyright (C) Jelmer Vernooij 2002
-
- Most of this code was ripped off of rpcclient.
- Copyright (C) Tim Potter 2000-2001
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-struct samtest_state {
- SAM_CONTEXT *context;
- NT_USER_TOKEN *token;
-};
-
-struct cmd_set {
- char *name;
- NTSTATUS (*fn)(struct samtest_state *sam, TALLOC_CTX *mem_ctx, int argc,
- char **argv);
- char *description;
- char *usage;
-};
-
-
diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c
index 05a8c3d815..72fbdc470f 100644
--- a/source3/torture/smbiconv.c
+++ b/source3/torture/smbiconv.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#undef realloc
static int
process_block (smb_iconv_t cd, const char *addr, size_t len, FILE *output)
@@ -85,7 +86,7 @@ incomplete character or shift sequence at end of buffer"));
static int
-process_fd (iconv_t cd, int fd, FILE *output)
+process_fd (smb_iconv_t cd, int fd, FILE *output)
{
/* we have a problem with reading from a descriptor since we must not
provide the iconv() function an incomplete character or shift
@@ -167,8 +168,8 @@ process_fd (iconv_t cd, int fd, FILE *output)
int main(int argc, char *argv[])
{
const char *file = NULL;
- char *from = "";
- char *to = "";
+ const char *from = "";
+ const char *to = "";
char *output = NULL;
const char *preload_modules[] = {NULL, NULL};
FILE *out = stdout;
@@ -213,7 +214,7 @@ int main(int argc, char *argv[])
}
cd = smb_iconv_open(to, from);
- if((int)cd == -1) {
+ if (cd == (smb_iconv_t)-1) {
DEBUG(0,("unable to find from or to encoding, exiting...\n"));
return 1;
}