summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-28 20:29:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:06 -0500
commite2b9dfd60bbbbb96e48b456b91eb679847a5c4c3 (patch)
tree51c0b9427fac9efdfc558267a2a21162e3368e17
parentbf547ff1ad4120f898e89fd75ec94f577a0fc84d (diff)
downloadsamba-e2b9dfd60bbbbb96e48b456b91eb679847a5c4c3.tar.gz
samba-e2b9dfd60bbbbb96e48b456b91eb679847a5c4c3.tar.bz2
samba-e2b9dfd60bbbbb96e48b456b91eb679847a5c4c3.zip
r7983: clean up some use of un-initialized variables found by valgrind
(This used to be commit 5f4a3f61a354346d7dde11d6d7930abe007b9603)
-rw-r--r--source3/printing/nt_printing.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 2796de835a..f23f4b7dfa 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1659,12 +1659,11 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->driverpath);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->driverpath);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- NTSTATUS status;
driver_unix_convert(new_name, conn, NULL, &bad_path, &st);
if ( !copy_file(new_name, old_name, conn, FILE_EXISTS_TRUNCATE|FILE_CREATE_IF_NOT_EXIST, 0, False, &err) ) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
- *perr = ntstatus_to_werror(status);
+ *perr = WERR_ACCESS_DENIED;
ver = -1;
}
}
@@ -1675,12 +1674,11 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->datafile);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->datafile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- NTSTATUS status;
driver_unix_convert(new_name, conn, NULL, &bad_path, &st);
if ( !copy_file(new_name, old_name, conn, FILE_EXISTS_TRUNCATE|FILE_CREATE_IF_NOT_EXIST, 0, False, &err) ) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
- *perr = ntstatus_to_werror(status);
+ *perr = WERR_ACCESS_DENIED;
ver = -1;
}
}
@@ -1693,12 +1691,11 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->configfile);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->configfile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- NTSTATUS status;
driver_unix_convert(new_name, conn, NULL, &bad_path, &st);
if ( !copy_file(new_name, old_name, conn, FILE_EXISTS_TRUNCATE|FILE_CREATE_IF_NOT_EXIST, 0, False, &err) ) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
- *perr = ntstatus_to_werror(status);
+ *perr = WERR_ACCESS_DENIED;
ver = -1;
}
}
@@ -1712,12 +1709,11 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->helpfile);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->helpfile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- NTSTATUS status;
driver_unix_convert(new_name, conn, NULL, &bad_path, &st);
if ( !copy_file(new_name, old_name, conn, FILE_EXISTS_TRUNCATE|FILE_CREATE_IF_NOT_EXIST, 0, False, &err) ) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
- *perr = ntstatus_to_werror(status);
+ *perr = WERR_ACCESS_DENIED;
ver = -1;
}
}
@@ -1740,12 +1736,11 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->dependentfiles[i]);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->dependentfiles[i]);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- NTSTATUS status;
driver_unix_convert(new_name, conn, NULL, &bad_path, &st);
if ( !copy_file(new_name, old_name, conn, FILE_EXISTS_TRUNCATE|FILE_CREATE_IF_NOT_EXIST, 0, False, &err) ) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
- *perr = ntstatus_to_werror(status);
+ *perr = WERR_ACCESS_DENIED;
ver = -1;
}
}