From 7a31ba77928f0cf10a2ceb63faaa4b8c5e59b0ab Mon Sep 17 00:00:00 2001 From: deuce <> Date: Wed, 18 Sep 2013 16:52:44 +0000 Subject: [PATCH] Remove unused variables and fix an incorrect typecast in realloc() --- src/sbbs3/scfg/scfg.c | 4 ++-- src/sbbs3/scfg/scfgchat.c | 4 ++-- src/sbbs3/scfg/scfgnet.c | 2 +- src/sbbs3/scfg/scfgsub.c | 2 +- src/sbbs3/scfg/scfgxfr2.c | 2 +- src/sbbs3/scfg/scfgxtrn.c | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sbbs3/scfg/scfg.c b/src/sbbs3/scfg/scfg.c index 8e7036c2fc..887416bce5 100644 --- a/src/sbbs3/scfg/scfg.c +++ b/src/sbbs3/scfg/scfg.c @@ -618,7 +618,7 @@ configuration before deciding, hit ~ ESC ~. void txt_cfg() { static int txt_dflt,bar; - char str[128],code[128],done=0,*p; + char str[128],code[128],done=0; int j,k; uint i; static txtsec_t savtxtsec; @@ -786,7 +786,7 @@ abreviation of the name. void shell_cfg() { static int shell_dflt,shell_bar; - char str[128],code[128],done=0,*p; + char str[128],code[128],done=0; int j,k; uint i; static shell_t savshell; diff --git a/src/sbbs3/scfg/scfgchat.c b/src/sbbs3/scfg/scfgchat.c index c252ec9fbe..b7dea63425 100644 --- a/src/sbbs3/scfg/scfgchat.c +++ b/src/sbbs3/scfg/scfgchat.c @@ -205,7 +205,7 @@ when running this chat pager, set this option to either `Standard` or ~Console~. void chan_cfg() { static int chan_dflt,chan_bar,opt_dflt; - char str[128],code[128],done=0,*p; + char str[128],code[128],done=0; int j,k; uint i; static chan_t savchan; @@ -611,7 +611,7 @@ This is the output string that results from this chat action. void guru_cfg() { static int guru_dflt,guru_bar,opt_dflt; - char str[128],code[128],done=0,*p; + char str[128],code[128],done=0; int j,k; uint i; static guru_t savguru; diff --git a/src/sbbs3/scfg/scfgnet.c b/src/sbbs3/scfg/scfgnet.c index ee6fdc6435..6f3c52795f 100644 --- a/src/sbbs3/scfg/scfgnet.c +++ b/src/sbbs3/scfg/scfgnet.c @@ -1218,7 +1218,7 @@ this option to `Strip out`. ,sizeof(ulong *)*(cfg.qhub[num]->subs+1)))==NULL || (cfg.qhub[num]->conf=(ushort *)realloc(cfg.qhub[num]->conf ,sizeof(ushort *)*(cfg.qhub[num]->subs+1)))==NULL - || (cfg.qhub[num]->mode=(uchar *)realloc(cfg.qhub[num]->mode + || (cfg.qhub[num]->mode=(char *)realloc(cfg.qhub[num]->mode ,sizeof(uchar *)*(cfg.qhub[num]->subs+1)))==NULL) { errormsg(WHERE,ERR_ALLOC,nulstr,cfg.qhub[num]->subs+1); continue; diff --git a/src/sbbs3/scfg/scfgsub.c b/src/sbbs3/scfg/scfgsub.c index 46e83ec829..d0ae21a84c 100644 --- a/src/sbbs3/scfg/scfgsub.c +++ b/src/sbbs3/scfg/scfgsub.c @@ -38,7 +38,7 @@ void sub_cfg(uint grpnum) { static int dflt,tog_dflt,opt_dflt,net_dflt,adv_dflt,bar; - char str[128],str2[128],done=0,code[128],*p; + char str[128],str2[128],done=0,code[128]; char path[MAX_PATH+1]; char data_dir[MAX_PATH+1]; int j,m,n,ptridx,q,s; diff --git a/src/sbbs3/scfg/scfgxfr2.c b/src/sbbs3/scfg/scfgxfr2.c index e36f8643f1..35d29ce9bb 100644 --- a/src/sbbs3/scfg/scfgxfr2.c +++ b/src/sbbs3/scfg/scfgxfr2.c @@ -679,7 +679,7 @@ command: `DIR /ON /AD /B > DIRS.RAW` void dir_cfg(uint libnum) { static int dflt,bar,tog_dflt,tog_bar,adv_dflt,opt_dflt; - char str[128],str2[128],code[128],path[MAX_PATH+1],done=0,*p; + char str[128],str2[128],code[128],path[MAX_PATH+1],done=0; char data_dir[MAX_PATH+1]; int j,n; uint i,dirnum[MAX_OPTS+1]; diff --git a/src/sbbs3/scfg/scfgxtrn.c b/src/sbbs3/scfg/scfgxtrn.c index 0a8bfaa09a..f1f2d517f8 100644 --- a/src/sbbs3/scfg/scfgxtrn.c +++ b/src/sbbs3/scfg/scfgxtrn.c @@ -781,7 +781,7 @@ re-initialized, set this option to ~Yes~. void xtrn_cfg(uint section) { static int ext_dflt,ext_bar,sub_bar,opt_dflt,time_dflt; - char str[128],code[128],done=0,*p; + char str[128],code[128],done=0; int j,k; uint i,n,xtrnnum[MAX_OPTS+1]; static xtrn_t savxtrn; @@ -1507,7 +1507,7 @@ option to `Yes`. void xedit_cfg() { static int dflt,dfltopt,bar; - char str[81],code[81],done=0,*p; + char str[81],code[81],done=0; int j,k; uint i; static xedit_t savxedit; @@ -2079,7 +2079,7 @@ return(0); void xtrnsec_cfg() { static int xtrnsec_dflt,xtrnsec_opt; - char str[128],code[128],done=0,*p; + char str[128],code[128],done=0; int j,k; uint i; static xtrnsec_t savxtrnsec; -- GitLab