mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-15 08:04:47 -07:00
Minor changes inspired by testing with latest GCC.
The latest GCC (what will become 4.5.x) has a few new warnings, that in these cases found some either downright buggy code, or at least seriously poorly designed code that could be improved. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@209759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+1
-1
@@ -242,7 +242,7 @@ static void dec_ie_bearer(unsigned char *p, Q931_info_t *qi, int *coding, int *c
|
||||
if (p[0] <= octet)
|
||||
goto done;
|
||||
|
||||
if (!p[octet++] & 0x80)
|
||||
if (~p[octet++] & 0x80)
|
||||
goto l2;
|
||||
|
||||
/* Wheee. V.110 speed information */
|
||||
|
||||
@@ -1906,9 +1906,7 @@ handle_event_nt(void *dat, void *arg)
|
||||
case CC_SETUP|INDICATION:
|
||||
{
|
||||
struct misdn_bchannel* bc=misdn_lib_get_free_bc(stack->port, 0, 1, 0);
|
||||
if (!bc)
|
||||
ERR_NO_CHANNEL:
|
||||
{
|
||||
if (!bc) {
|
||||
msg_t *dmsg;
|
||||
cb_log(4, stack->port, "Patch from MEIDANIS:Sending RELEASE_COMPLETE %x (No free Chan for you..)\n", hh->dinfo);
|
||||
dmsg = create_l3msg(CC_RELEASE_COMPLETE | REQUEST,MT_RELEASE_COMPLETE, hh->dinfo,sizeof(RELEASE_COMPLETE_t), 1);
|
||||
@@ -2106,8 +2104,15 @@ handle_event_nt(void *dat, void *arg)
|
||||
if (bc->channel<=0 || bc->channel==0xff)
|
||||
bc->channel=0;
|
||||
|
||||
if (find_free_chan_in_stack(stack,bc, bc->channel,0)<0)
|
||||
goto ERR_NO_CHANNEL;
|
||||
if (find_free_chan_in_stack(stack,bc, bc->channel,0)<0) {
|
||||
msg_t *dmsg;
|
||||
cb_log(4, stack->port, "Patch from MEIDANIS:Sending RELEASE_COMPLETE %x (No free Chan for you..)\n", hh->dinfo);
|
||||
dmsg = create_l3msg(CC_RELEASE_COMPLETE | REQUEST,MT_RELEASE_COMPLETE, hh->dinfo,sizeof(RELEASE_COMPLETE_t), 1);
|
||||
pthread_mutex_lock(&stack->nstlock);
|
||||
stack->nst.manager_l3(&stack->nst, dmsg);
|
||||
free_msg(msg);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case EVENT_RELEASE:
|
||||
case EVENT_RELEASE_COMPLETE:
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ editline/libedit.a:
|
||||
$(MAKE) -C editline libedit.a
|
||||
|
||||
db1-ast/libdb1.a:
|
||||
CFLAGS="$(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
|
||||
_ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a
|
||||
|
||||
ast_expr2.c ast_expr2.h:
|
||||
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
|
||||
|
||||
+1
-1
@@ -744,7 +744,7 @@ void checknoargs( int argcount, char *args[])
|
||||
void parseargs( int argcount, char *args[], int fileswitch)
|
||||
{
|
||||
char *filename;
|
||||
int tempint;
|
||||
int tempint = 0;
|
||||
|
||||
if ((fileswitch & 1) != 0) /* If getting infile */
|
||||
in = NULL;
|
||||
|
||||
Reference in New Issue
Block a user