Summary:ASTERISK-05253: [patch] Remove superfluous checks in chanvars.c
Reporter:Tilghman Lesher (tilghman)Labels:
Date Opened:2005-10-05 17:02:30Date Closed:2008-01-15 15:50:20.000-0600
Versions:Frequency of
Environment:Attachments:( 0) 20051005__simplify_chanvars.diff.txt
Description:There's a couple of things that are big no-no's in chanvars.c:

1.  Using the value of strlen as a boolean.
2.  Checking to see if a char is non-NULL, then checking again to see if the char is '_' (if it's an _, it's non-NULL, no need for the first check).
3.  Using strncpy() instead of ast_copy_string().
Comments:By: Kevin P. Fleming (kpfleming) 2005-10-05 17:15:56

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:50:20.000-0600

Repository: asterisk
Revision: 6733

U   trunk/chanvars.c

r6733 | kpfleming | 2008-01-15 15:50:19 -0600 (Tue, 15 Jan 2008) | 2 lines

clean up some poorly constructed code (issue ASTERISK-5253, with mod to include header file for ast_copy_string())