Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandrs Saveljevs <git-no-reply@zabbix.com>2010-03-23 14:07:28 +0300
committerAleksandrs Saveljevs <git-no-reply@zabbix.com>2010-03-23 14:07:28 +0300
commitc7b3343284b5ed83864be0e4f9331fd550270b71 (patch)
tree8dabff224808627c8f7a51b2b087ba8948ba5d8e
parentbb8758f0b9ed8761a34d2cc0d90011fe2929101b (diff)
- fixed typos and removed // comments
[svn merge svn://svn.zabbix.com/branches/1.8 -r 11008:11017]
-rw-r--r--ChangeLog2
-rw-r--r--include/common.h2
-rw-r--r--include/dbcache.h2
-rw-r--r--include/perfmon.h18
-rw-r--r--include/threads.h6
-rw-r--r--src/libs/zbxcommon/misc.c4
-rw-r--r--src/libs/zbxcommon/str.c8
-rw-r--r--src/libs/zbxdbcache/dbconfig.c6
-rw-r--r--src/libs/zbxsys/threads.c6
-rw-r--r--src/libs/zbxsysinfo/common/common.c2
-rw-r--r--src/libs/zbxsysinfo/win32/proc.c10
-rw-r--r--src/zabbix_agent/active.c2
-rw-r--r--src/zabbix_agent/listener.c2
-rw-r--r--src/zabbix_agent/stats.c2
-rw-r--r--src/zabbix_proxy/proxyconfig/proxyconfig.c6
-rw-r--r--src/zabbix_sender/zabbix_sender.c2
-rw-r--r--src/zabbix_server/dbconfig/dbconfig.c4
-rw-r--r--src/zabbix_server/poller/checks_telnet.c14
-rw-r--r--src/zabbix_server/trapper/nodecommand.c16
19 files changed, 49 insertions, 65 deletions
diff --git a/ChangeLog b/ChangeLog
index aceba61d2c1..96d898b52f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -146,7 +146,7 @@ Changes for 1.8.2
- [DEV-163] improved the description of "perf_counter" check in the "help_items" table (Dmitry)
- [ZBX-1324] replaced more user visible strings ZABBIX with Zabbix (Richlv)
- [ZBX-1859] fixed map element image (Aly)
- - [ZBX-954] fix minor typos (Richlv)
+ - [ZBX-954] fix minor typos and removed // comments (asaveljevs,Richlv)
Changes for 1.8.1
diff --git a/include/common.h b/include/common.h
index 358ae0d26fb..bc6b9308db9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -901,7 +901,7 @@ int get_nearestindex(void *p, size_t sz, int num, zbx_uint64_t id);
int uint64_array_add(zbx_uint64_t **values, int *alloc, int *num, zbx_uint64_t value, int alloc_step);
void uint64_array_merge(zbx_uint64_t **values, int *alloc, int *num, zbx_uint64_t *value, int value_num, int alloc_step);
int uint64_array_exists(zbx_uint64_t *values, int num, zbx_uint64_t value);
-void uint64_array_rm(zbx_uint64_t *values, int *num, zbx_uint64_t *rm_values, int rm_num);
+void uint64_array_remove(zbx_uint64_t *values, int *num, zbx_uint64_t *rm_values, int rm_num);
#ifdef _WINDOWS
LPTSTR zbx_acp_to_unicode(LPCSTR acp_string);
diff --git a/include/dbcache.h b/include/dbcache.h
index 24847230ca2..522595556d3 100644
--- a/include/dbcache.h
+++ b/include/dbcache.h
@@ -229,7 +229,7 @@ zbx_uint64_t DCget_nextid(const char *table_name, const char *field_name, int nu
int DCget_item_lastclock(zbx_uint64_t itemid);
-void DCsync_confguration();
+void DCsync_configuration();
void init_configuration_cache();
void free_configuration_cache();
diff --git a/include/perfmon.h b/include/perfmon.h
index 502502758ad..4828705e00f 100644
--- a/include/perfmon.h
+++ b/include/perfmon.h
@@ -24,9 +24,9 @@
# error "This module allowed only for Windows OS"
#endif /* _WINDOWS */
-//
-// Performance Counter Indexes
-//
+/*
+ * Performance Counter Indexes
+ */
#define PCI_SYSTEM (2)
#define PCI_PROCESSOR (238)
@@ -36,18 +36,18 @@
#define PCI_TERMINAL_SERVICES (2176)
#define PCI_TOTAL_SESSIONS (2178)
-//
-// Performance Countername structure
-//
+/*
+ * Performance Countername structure
+ */
struct perfcounter
{
struct perfcounter *next;
unsigned long pdhIndex;
TCHAR name[PDH_MAX_COUNTER_NAME];
- /* must be caracter array! if you want to rewrite */
- /* to dinacal memory allocation CHECK for usage */
- /* of sizeof function */
+ /* must be character array! if you want to rewrite */
+ /* to use dynamic memory allocation CHECK for usage */
+ /* of sizeof function */
};
typedef struct perfcounter PERFCOUNTER;
diff --git a/include/threads.h b/include/threads.h
index d6cec034b13..6c7c7882296 100644
--- a/include/threads.h
+++ b/include/threads.h
@@ -34,7 +34,7 @@
#define ZBX_THREAD_ENTRY(entry_name, arg_name) \
unsigned __stdcall entry_name (void * arg_name)
- #define zbx_tread_exit(status) \
+ #define zbx_thread_exit(status) \
_endthreadex((unsigned int)(status)); \
return ((unsigned)(status))
@@ -56,7 +56,7 @@
#define ZBX_THREAD_ENTRY(entry_name, arg_name) \
unsigned entry_name (void * arg_name )
- #define zbx_tread_exit(status) \
+ #define zbx_thread_exit(status) \
exit((int)(status)); \
return ((unsigned)(status))
@@ -68,7 +68,7 @@
ZBX_THREAD_HANDLE zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler), void *args);
int zbx_thread_wait(ZBX_THREAD_HANDLE thread);
-/* zbx_tread_exit(status) // declared as define !!! */
+/* zbx_thread_exit(status) -- declared as define !!! */
long int zbx_get_thread_id(void);
#endif /* ZABBIX_THREADS_H */
diff --git a/src/libs/zbxcommon/misc.c b/src/libs/zbxcommon/misc.c
index 6fcf1e66c2a..bd5045e9107 100644
--- a/src/libs/zbxcommon/misc.c
+++ b/src/libs/zbxcommon/misc.c
@@ -1620,7 +1620,7 @@ int uint64_array_exists(zbx_uint64_t *values, int num, zbx_uint64_t value)
* *
* Function: uint64_array_remove *
* *
- * Purpose: add uint64 value to dynamic array *
+ * Purpose: remove uint64 values from array *
* *
* Parameters: *
* *
@@ -1631,7 +1631,7 @@ int uint64_array_exists(zbx_uint64_t *values, int num, zbx_uint64_t value)
* Comments: *
* *
******************************************************************************/
-void uint64_array_rm(zbx_uint64_t *values, int *num, zbx_uint64_t *rm_values, int rm_num)
+void uint64_array_remove(zbx_uint64_t *values, int *num, zbx_uint64_t *rm_values, int rm_num)
{
int rindex, index;
diff --git a/src/libs/zbxcommon/str.c b/src/libs/zbxcommon/str.c
index 02bab78d317..c2d5255b111 100644
--- a/src/libs/zbxcommon/str.c
+++ b/src/libs/zbxcommon/str.c
@@ -343,7 +343,7 @@ void zbx_chrcpy_alloc(char **str, int *alloc_len, int *offset, const char src)
(*str)[*offset] = '\0';
}
-/* Has to be rewritten to avoi malloc */
+/* Has to be rewritten to avoid malloc */
char *string_replace(char *str, char *sub_str1, char *sub_str2)
{
char *new_str = NULL;
@@ -361,7 +361,7 @@ char *string_replace(char *str, char *sub_str1, char *sub_str2)
len = (long)strlen(sub_str1);
- /* count the number of occurances of sub_str1 */
+ /* count the number of occurences of sub_str1 */
for ( p=str; (p = strstr(p, sub_str1)); p+=len, count++ );
if ( 0 == count ) return strdup(str);
@@ -373,7 +373,7 @@ char *string_replace(char *str, char *sub_str1, char *sub_str2)
for (q=str,t=new_str,p=str; (p = strstr(p, sub_str1)); )
{
- /* copy until next occurance of sub_str1 */
+ /* copy until next occurence of sub_str1 */
for ( ; q < p; *t++ = *q++);
q += len;
p = q;
@@ -1782,7 +1782,7 @@ u_char zbx_hex2num(char c)
* ilen - binary data length *
* output - pointer to output buffer *
* olen - output buffer length *
- * *
+ * *
* Return value: *
* *
* Author: Aleksander Vladishev *
diff --git a/src/libs/zbxdbcache/dbconfig.c b/src/libs/zbxdbcache/dbconfig.c
index 9c2b2227f6f..0691da498c8 100644
--- a/src/libs/zbxdbcache/dbconfig.c
+++ b/src/libs/zbxdbcache/dbconfig.c
@@ -2112,7 +2112,7 @@ static void DCsync_hosts()
/******************************************************************************
* *
- * Function: DCsync_confguration *
+ * Function: DCsync_configuration *
* *
* Purpose: Synchronize configuration data from database *
* *
@@ -2125,9 +2125,9 @@ static void DCsync_hosts()
* Comments: *
* *
******************************************************************************/
-void DCsync_confguration()
+void DCsync_configuration()
{
- const char *__function_name = "DCsync_confguration";
+ const char *__function_name = "DCsync_configuration";
double sec;
zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __function_name);
diff --git a/src/libs/zbxsys/threads.c b/src/libs/zbxsys/threads.c
index 82cf38567b8..bf9a84ca4fd 100644
--- a/src/libs/zbxsys/threads.c
+++ b/src/libs/zbxsys/threads.c
@@ -61,7 +61,7 @@ int zbx_fork()
* Author: Eugene Grigorjev *
* *
* Comments: *
- * The zbx_tread_exit must be called from the handler! *
+ * The zbx_thread_exit must be called from the handler! *
* *
******************************************************************************/
@@ -87,9 +87,9 @@ ZBX_THREAD_HANDLE zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler), void *args
{
(*handler)(args);
- /* The zbx_tread_exit must be called from the handler */
+ /* The zbx_thread_exit must be called from the handler */
/* And in normal case the program will never reach this point. */
- zbx_tread_exit(0);
+ zbx_thread_exit(0);
/* Program will never reach this point. */
}
else if(thread < 0)
diff --git a/src/libs/zbxsysinfo/common/common.c b/src/libs/zbxsysinfo/common/common.c
index 9c6c071c338..426e5beb1d3 100644
--- a/src/libs/zbxsysinfo/common/common.c
+++ b/src/libs/zbxsysinfo/common/common.c
@@ -447,7 +447,7 @@ lbl_exit:
zabbix_log(LOG_LEVEL_WARNING, "fork failed for command '%s'",command);
return SYSINFO_RET_FAIL;
case 0:
- pid = zbx_fork(); /* run new tread 2 to replace by command */
+ pid = zbx_fork(); /* run new thread 2 to replace by command */
switch(pid)
{
case -1:
diff --git a/src/libs/zbxsysinfo/win32/proc.c b/src/libs/zbxsysinfo/win32/proc.c
index d02578272ce..a0b966a0e2a 100644
--- a/src/libs/zbxsysinfo/win32/proc.c
+++ b/src/libs/zbxsysinfo/win32/proc.c
@@ -59,14 +59,14 @@ static int zbx_get_process_username(HANDLE hProcess, char *userName)
assert(userName);
- //clean result;
+ /* clean result; */
*userName = '\0';
- //open the processes token
+ /* open the processes token */
if (0 == OpenProcessToken(hProcess, TOKEN_QUERY, &tok))
return res;
- // Get required buffer size and allocate the TOKEN_USER buffer
+ /* Get required buffer size and allocate the TOKEN_USER buffer */
if (0 == GetTokenInformation(tok, (TOKEN_INFORMATION_CLASS)1, (LPVOID)ptu, 0, &sz))
{
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
@@ -74,11 +74,11 @@ static int zbx_get_process_username(HANDLE hProcess, char *userName)
ptu = (PTOKEN_USER)zbx_malloc(ptu, sz);
}
- // Get the token user information from the access token.
+ /* Get the token user information from the access token. */
if (0 == GetTokenInformation(tok, (TOKEN_INFORMATION_CLASS)1, (LPVOID)ptu, sz, &sz))
goto lbl_err;
- //get the account/domain name of the SID
+ /* get the account/domain name of the SID */
nlen = MAX_NAME;
dlen = MAX_NAME;
if (0 == LookupAccountSid(NULL, ptu->User.Sid, name, &nlen, dom, &dlen, (PSID_NAME_USE)&iUse))
diff --git a/src/zabbix_agent/active.c b/src/zabbix_agent/active.c
index 00e8a28352b..419be6313d6 100644
--- a/src/zabbix_agent/active.c
+++ b/src/zabbix_agent/active.c
@@ -1209,6 +1209,6 @@ ZBX_THREAD_ENTRY(active_checks_thread, args)
ZBX_DO_EXIT();
- zbx_tread_exit(0);
+ zbx_thread_exit(0);
}
diff --git a/src/zabbix_agent/listener.c b/src/zabbix_agent/listener.c
index 185eb9065fc..d7218d8f63e 100644
--- a/src/zabbix_agent/listener.c
+++ b/src/zabbix_agent/listener.c
@@ -131,5 +131,5 @@ ZBX_THREAD_ENTRY(listener_thread, pSock)
ZBX_DO_EXIT();
- zbx_tread_exit(0);
+ zbx_thread_exit(0);
}
diff --git a/src/zabbix_agent/stats.c b/src/zabbix_agent/stats.c
index 0bb6e7030f9..81f08defdd4 100644
--- a/src/zabbix_agent/stats.c
+++ b/src/zabbix_agent/stats.c
@@ -327,5 +327,5 @@ ZBX_THREAD_ENTRY(collector_thread, args)
ZBX_DO_EXIT();
- zbx_tread_exit(0);
+ zbx_thread_exit(0);
}
diff --git a/src/zabbix_proxy/proxyconfig/proxyconfig.c b/src/zabbix_proxy/proxyconfig/proxyconfig.c
index 7c73315f3ed..f0946d7e05e 100644
--- a/src/zabbix_proxy/proxyconfig/proxyconfig.c
+++ b/src/zabbix_proxy/proxyconfig/proxyconfig.c
@@ -240,7 +240,7 @@ static int process_proxyconfig_table(struct zbx_json_parse *jp, const char *tabl
zbx_snprintf_alloc(&sql, &sql_alloc, &sql_offset, 8, "end;\n");
#endif
- uint64_array_rm(old, &old_num, new, new_num);
+ uint64_array_remove(old, &old_num, new, new_num);
if (old_num > 0)
{
@@ -264,7 +264,7 @@ static int process_proxyconfig_table(struct zbx_json_parse *jp, const char *tabl
return SUCCEED;
json_error:
- zabbix_log(LOG_LEVEL_DEBUG, "Can't proceed table \"%s\". %s",
+ zabbix_log(LOG_LEVEL_DEBUG, "Can't process table \"%s\". %s",
tablename,
zbx_json_strerror());
db_error:
@@ -312,7 +312,7 @@ static void process_proxyconfig(struct zbx_json_parse *jp)
* ^-----------------------------------------------------------------^
*/ if (FAIL == zbx_json_brackets_open(p, &jp_obj))
{
- zabbix_log(LOG_LEVEL_DEBUG, "Can't proceed table \"%s\". %s",
+ zabbix_log(LOG_LEVEL_DEBUG, "Can't process table \"%s\". %s",
buf,
zbx_json_strerror());
res = FAIL;
diff --git a/src/zabbix_sender/zabbix_sender.c b/src/zabbix_sender/zabbix_sender.c
index dd89fd9f0b6..16f29444fcf 100644
--- a/src/zabbix_sender/zabbix_sender.c
+++ b/src/zabbix_sender/zabbix_sender.c
@@ -257,7 +257,7 @@ static ZBX_THREAD_ENTRY(send_value, args)
zabbix_log(LOG_LEVEL_DEBUG, "Send value error: %s", zbx_tcp_strerror());
}
- zbx_tread_exit(ret);
+ zbx_thread_exit(ret);
}
static void init_config(const char* config_file)
diff --git a/src/zabbix_server/dbconfig/dbconfig.c b/src/zabbix_server/dbconfig/dbconfig.c
index bc51804b45a..21daa684ced 100644
--- a/src/zabbix_server/dbconfig/dbconfig.c
+++ b/src/zabbix_server/dbconfig/dbconfig.c
@@ -45,7 +45,7 @@
int main_dbconfig_loop()
{
double sec;
-//zabbix_set_log_level(LOG_LEVEL_DEBUG);
+
zabbix_log(LOG_LEVEL_DEBUG, "In main_dbconfig_loop()");
zbx_setproctitle("db config [connecting to the database]");
@@ -56,7 +56,7 @@ int main_dbconfig_loop()
zabbix_log(LOG_LEVEL_DEBUG, "Syncing ...");
sec = zbx_time();
- DCsync_confguration();
+ DCsync_configuration();
sec = zbx_time() - sec;
zabbix_log(LOG_LEVEL_DEBUG, "DB config spent " ZBX_FS_DBL " second while processing configuration data. "
diff --git a/src/zabbix_server/poller/checks_telnet.c b/src/zabbix_server/poller/checks_telnet.c
index 9002216bb96..f60fdd4455b 100644
--- a/src/zabbix_server/poller/checks_telnet.c
+++ b/src/zabbix_server/poller/checks_telnet.c
@@ -28,7 +28,7 @@ static char prompt_char = '\0';
static int telnet_waitsocket(int socket_fd, int mode/* 1 - read; 0 - write */)
{
-// const char *__function_name = "telnet_waitsocket";
+/* const char *__function_name = "telnet_waitsocket"; */
struct timeval tv;
int rc;
fd_set fd, *writefd = NULL, *readfd = NULL;
@@ -46,14 +46,14 @@ static int telnet_waitsocket(int socket_fd, int mode/* 1 - read; 0 - write */)
rc = select(socket_fd + 1, readfd, writefd, NULL, &tv);
-// zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __function_name, rc);
+/* zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __function_name, rc); */
return rc;
}
static ssize_t telnet_socket_read(int socket_fd, void *buf, size_t count)
{
-// const char *__function_name = "telnet_socket_read";
+/* const char *__function_name = "telnet_socket_read"; */
ssize_t rc;
while (-1 == (rc = read(socket_fd, buf, count)))
@@ -67,14 +67,14 @@ static ssize_t telnet_socket_read(int socket_fd, void *buf, size_t count)
break;
}
-// zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __function_name, rc);
+/* zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __function_name, rc); */
return rc;
}
static ssize_t telnet_socket_write(int socket_fd, const void *buf, size_t count)
{
-// const char *__function_name = "telnet_socket_write";
+/* const char *__function_name = "telnet_socket_write"; */
ssize_t rc;
while (-1 == (rc = write(socket_fd, buf, count)))
@@ -87,7 +87,7 @@ static ssize_t telnet_socket_write(int socket_fd, const void *buf, size_t count)
break;
}
-// zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __function_name, rc);
+/* zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __function_name, rc); */
return rc;
}
@@ -129,7 +129,7 @@ static ssize_t telnet_read(int socket_fd, char *buf, size_t *buf_left, size_t *b
case 252: /* Option code (WON'T) */
case 253: /* Option code (DO) */
case 254: /* Option code (DON'T) */
- // reply to all commands with "WONT", unless it is SGA (suppres go ahead)
+ /* reply to all commands with "WONT", unless it is SGA (suppres go ahead) */
while (0 == (rc = telnet_socket_read(socket_fd, &c3, 1)))
;
diff --git a/src/zabbix_server/trapper/nodecommand.c b/src/zabbix_server/trapper/nodecommand.c
index 679c3534d6e..64ff0ac89f1 100644
--- a/src/zabbix_server/trapper/nodecommand.c
+++ b/src/zabbix_server/trapper/nodecommand.c
@@ -17,22 +17,6 @@
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
-
-//#include <stdio.h>
-//#include <stdlib.h>
-//#include <unistd.h>
-//#include <sys/types.h>
-//#include <sys/stat.h>
-//#include <netinet/in.h>
-//#include <netdb.h>
-
-//#include <string.h>
-
-//#include <time.h>
-
-//#include <sys/socket.h>
-//#include <errno.h>
-
#include "common.h"
#include "nodecommand.h"
#include "comms.h"