diff options
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index edbd1562bc..725672da69 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -387,7 +387,6 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) char *cmd = lp_deleteprinter_cmd(); pstring command; int ret; - int i; /* Printer->dev.handlename equals portname equals sharename */ slprintf(command, sizeof(command)-1, "%s \"%s\"", cmd, @@ -406,7 +405,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) /* go ahead and re-read the services immediately */ reload_services( False ); - if ( ( i = lp_servicenumber( Printer->dev.handlename ) ) < 0 ) + if ( lp_servicenumber( Printer->dev.handlename ) < 0 ) return WERR_ACCESS_DENIED; } @@ -957,7 +956,7 @@ static void send_notify2_changes( SPOOLSS_NOTIFY_MSG_CTR *ctr, uint32 idx ) SPOOL_NOTIFY_INFO_DATA *data; uint32 data_len = 0; uint32 id; - int i, event_index; + int i; /* Is there notification on this handle? */ @@ -980,8 +979,6 @@ static void send_notify2_changes( SPOOLSS_NOTIFY_MSG_CTR *ctr, uint32 idx ) data = talloc( mem_ctx, msg_group->num_msgs*sizeof(SPOOL_NOTIFY_INFO_DATA) ); ZERO_STRUCTP(data); - event_index = 0; - /* build the array of change notifications */ sending_msg_count = 0; @@ -3753,7 +3750,6 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, Printer_entry *Printer=find_printer_index_by_hnd(p, hnd); int n_services=lp_numservices(); int i; - uint32 id; SPOOL_NOTIFY_OPTION *option; SPOOL_NOTIFY_OPTION_TYPE *option_type; @@ -3763,7 +3759,6 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, return WERR_BADFID; option=Printer->notify.option; - id=1; info->version=2; info->data=NULL; info->count=0; @@ -6192,12 +6187,9 @@ static WERROR publish_or_unpublish_printer(pipes_struct *p, POLICY_HND *handle, SPOOL_PRINTER_INFO_LEVEL_7 *info7 = info->info_7; int snum; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); - WERROR result; DEBUG(5,("publish_or_unpublish_printer, action = %d\n",info7->action)); - result = WERR_OK; - if (!Printer) return WERR_BADFID; @@ -7722,7 +7714,6 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S NT_PRINTER_INFO_LEVEL *printer = NULL; - uint32 param_index; uint32 biggest_valuesize; uint32 biggest_datasize; uint32 data_len; @@ -7771,7 +7762,6 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S { DEBUGADD(6,("Activating NT mega-hack to find sizes\n")); - param_index = 0; biggest_valuesize = 0; biggest_datasize = 0; @@ -9185,12 +9175,11 @@ static WERROR getprintprocessordirectory_level_1(UNISTR2 *name, { pstring path; pstring long_archi; - const char *short_archi; PRINTPROCESSOR_DIRECTORY_1 *info=NULL; unistr2_to_ascii(long_archi, environment, sizeof(long_archi)-1); - if (!(short_archi = get_short_archi(long_archi))) + if (!get_short_archi(long_archi)) return WERR_INVALID_ENVIRONMENT; if((info=(PRINTPROCESSOR_DIRECTORY_1 *)malloc(sizeof(PRINTPROCESSOR_DIRECTORY_1))) == NULL) |