fix a few small things found by using sparse

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-10-30 16:49:02 +00:00
parent de90c84b1a
commit 10d36d9f34
10 changed files with 39 additions and 32 deletions

View File

@@ -117,6 +117,7 @@ int daemon(int, int); /* defined in libresolv of all places */
#include "asterisk/devicestate.h"
#include "asterisk/module.h"
#include "asterisk/dsp.h"
#include "asterisk/buildinfo.h"
#include "asterisk/doxyref.h" /* Doxygen documentation */
@@ -246,13 +247,6 @@ static char ast_config_AST_CTL_OWNER[PATH_MAX] = "\0";
static char ast_config_AST_CTL_GROUP[PATH_MAX] = "\0";
static char ast_config_AST_CTL[PATH_MAX] = "asterisk.ctl";
extern const char *ast_build_hostname;
extern const char *ast_build_kernel;
extern const char *ast_build_machine;
extern const char *ast_build_os;
extern const char *ast_build_date;
extern const char *ast_build_user;
static char *_argv[256];
static int shuttingdown;
static int restartnow;

View File

@@ -23,6 +23,7 @@
* \author Kevin P. Fleming <kpfleming@digium.com>
*/
#include "asterisk/buildinfo.h"
#include "asterisk/build.h"
const char *ast_build_hostname = BUILD_HOSTNAME;

View File

@@ -53,15 +53,15 @@ struct ast_dial {
/*! \brief Dialing channel structure. Contains per-channel dialing options, asterisk channel, and more! */
struct ast_dial_channel {
int num; /*!< Unique number for dialed channel */
int timeout; /*!< Maximum time allowed for attempt */
char *tech; /*!< Technology being dialed */
char *device; /*!< Device being dialed */
void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
int cause; /*!< Cause code in case of failure */
int is_running_app:1; /*!< Is this running an application? */
struct ast_channel *owner; /*!< Asterisk channel */
AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
int num; /*!< Unique number for dialed channel */
int timeout; /*!< Maximum time allowed for attempt */
char *tech; /*!< Technology being dialed */
char *device; /*!< Device being dialed */
void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
int cause; /*!< Cause code in case of failure */
unsigned int is_running_app:1; /*!< Is this running an application? */
struct ast_channel *owner; /*!< Asterisk channel */
AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
};
/*! \brief Typedef for dial option enable */

View File

@@ -57,7 +57,7 @@ struct ast_dnsmgr_entry {
/*! SRV record to lookup, if provided. Composed of service, protocol, and domain name: _Service._Proto.Name */
char *service;
/*! Set to 1 if the entry changes */
int changed:1;
unsigned int changed:1;
ast_mutex_t lock;
AST_RWLIST_ENTRY(ast_dnsmgr_entry) list;
/*! just 1 here, but we use calloc to allocate the correct size */