mirror of
https://github.com/asterisk/asterisk.git
synced 2025-12-04 20:21:55 +00:00
move variable declarations to the beginning of a block.
Not applicable to previous branches. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -512,11 +512,13 @@ static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, un
|
|||||||
static void packdate(unsigned char *o, time_t w)
|
static void packdate(unsigned char *o, time_t w)
|
||||||
{
|
{
|
||||||
struct tm t;
|
struct tm t;
|
||||||
|
int z;
|
||||||
|
|
||||||
ast_localtime(&w, &t, NULL);
|
ast_localtime(&w, &t, NULL);
|
||||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
|
||||||
int z = -t.tm_gmtoff / 60 / 15;
|
z = -t.tm_gmtoff / 60 / 15;
|
||||||
#else
|
#else
|
||||||
int z = timezone / 60 / 15;
|
z = timezone / 60 / 15;
|
||||||
#endif
|
#endif
|
||||||
*o++ = ((t.tm_year % 10) << 4) + (t.tm_year % 100) / 10;
|
*o++ = ((t.tm_year % 10) << 4) + (t.tm_year % 100) / 10;
|
||||||
*o++ = (((t.tm_mon + 1) % 10) << 4) + (t.tm_mon + 1) / 10;
|
*o++ = (((t.tm_mon + 1) % 10) << 4) + (t.tm_mon + 1) / 10;
|
||||||
|
|||||||
@@ -2838,7 +2838,6 @@ static int load_config(void)
|
|||||||
AST_RWLIST_WRLOCK(&feature_groups);
|
AST_RWLIST_WRLOCK(&feature_groups);
|
||||||
|
|
||||||
ctg = NULL;
|
ctg = NULL;
|
||||||
struct ast_call_feature *feature;
|
|
||||||
while ((ctg = ast_category_browse(cfg, ctg))) {
|
while ((ctg = ast_category_browse(cfg, ctg))) {
|
||||||
for (i = 0; i < ARRAY_LEN(categories); i++) {
|
for (i = 0; i < ARRAY_LEN(categories); i++) {
|
||||||
if (!strcasecmp(categories[i], ctg))
|
if (!strcasecmp(categories[i], ctg))
|
||||||
@@ -2852,6 +2851,8 @@ static int load_config(void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (var = ast_variable_browse(cfg, ctg); var; var = var->next) {
|
for (var = ast_variable_browse(cfg, ctg); var; var = var->next) {
|
||||||
|
struct ast_call_feature *feature;
|
||||||
|
|
||||||
AST_LIST_LOCK(&feature_list);
|
AST_LIST_LOCK(&feature_list);
|
||||||
if(!(feature = find_dynamic_feature(var->name)) &&
|
if(!(feature = find_dynamic_feature(var->name)) &&
|
||||||
!(feature = ast_find_call_feature(var->name))) {
|
!(feature = ast_find_call_feature(var->name))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user