[svn-commits] russell: branch group/security_events r201204 - /team/group/security_events/m...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 16 17:20:16 CDT 2009


Author: russell
Date: Tue Jun 16 17:20:10 2009
New Revision: 201204

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201204
Log:
Remove unneeded initializations, and an unneeded NULL check

Modified:
    team/group/security_events/main/manager.c

Modified: team/group/security_events/main/manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/security_events/main/manager.c?view=diff&rev=201204&r1=201203&r2=201204
==============================================================================
--- team/group/security_events/main/manager.c (original)
+++ team/group/security_events/main/manager.c Tue Jun 16 17:20:10 2009
@@ -1754,7 +1754,7 @@
 
 static void report_invalid_user(const struct mansession *s, const char *username)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_security_event_inval_acct_id inval_acct_id = {
 		.common.event_type = AST_SECURITY_EVENT_INVAL_ACCT_ID,
@@ -1780,7 +1780,7 @@
 
 static void report_failed_acl(const struct mansession *s, const char *username)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_security_event_failed_acl failed_acl_event = {
 		.common.event_type = AST_SECURITY_EVENT_FAILED_ACL,
@@ -1806,7 +1806,7 @@
 
 static void report_inval_password(const struct mansession *s, const char *username)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_security_event_inval_password inval_password = {
 		.common.event_type = AST_SECURITY_EVENT_INVAL_PASSWORD,
@@ -1832,7 +1832,7 @@
 
 static void report_auth_success(const struct mansession *s)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_security_event_successful_auth successful_auth = {
 		.common.event_type = AST_SECURITY_EVENT_SUCCESSFUL_AUTH,
@@ -1858,7 +1858,7 @@
 
 static void report_req_not_allowed(const struct mansession *s, const char *action)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_str *request_type = ast_str_alloca(64);
 	struct ast_security_event_req_not_allowed req_not_allowed = {
@@ -1888,7 +1888,7 @@
 
 static void report_req_bad_format(const struct mansession *s, const char *action)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_str *request_type = ast_str_alloca(64);
 	struct ast_security_event_req_bad_format req_bad_format = {
@@ -1919,7 +1919,7 @@
 static void report_failed_challenge_response(const struct mansession *s,
 		const char *response, const char *expected_response)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_security_event_chal_resp_failed chal_resp_failed = {
 		.common.event_type = AST_SECURITY_EVENT_CHAL_RESP_FAILED,
@@ -1948,7 +1948,7 @@
 
 static void report_session_limit(const struct mansession *s)
 {
-	struct sockaddr_in sin_local = { 0, };
+	struct sockaddr_in sin_local;
 	struct ast_str *session_id = ast_str_alloca(32);
 	struct ast_security_event_session_limit session_limit = {
 		.common.event_type = AST_SECURITY_EVENT_SESSION_LIMIT,
@@ -2024,7 +2024,7 @@
 				S_OR(s->session->challenge, ""));
 		}
 	} else if (user->secret) {
-		if (password && !strcmp(password, user->secret)) {
+		if (!strcmp(password, user->secret)) {
 			error = 0;
 		} else {
 			report_inval_password(s, username);




More information about the svn-commits mailing list