diff options
-rw-r--r-- | include/sysinc.h | 36 | ||||
-rw-r--r-- | src/libs/zbxsysinfo/solaris/kernel.c | 6 |
2 files changed, 21 insertions, 21 deletions
diff --git a/include/sysinc.h b/include/sysinc.h index 548d8949..ad772e9a 100644 --- a/include/sysinc.h +++ b/include/sysinc.h @@ -29,20 +29,32 @@ # include <assert.h> #endif -#ifdef HAVE_ARPA_NAMESER_H -# include <arpa/nameser.h> +#ifdef HAVE_ERRNO_H +# include <errno.h> #endif #ifdef HAVE_CTYPE_H # include <ctype.h> #endif -#ifdef HAVE_DIRENT_H -# include <dirent.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> #endif -#ifdef HAVE_ERRNO_H -# include <errno.h> +#ifdef HAVE_STRING_H +# include <string.h> +#endif + +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif + +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> +#endif + +#ifdef HAVE_DIRENT_H +# include <dirent.h> #endif #ifdef HAVE_FCNTL_H @@ -93,14 +105,6 @@ # include <stdint.h> #endif -#ifdef HAVE_STRING_H -# include <string.h> -#endif - -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif - #ifdef HAVE_SYS_LOADAVG_H # include <sys/loadavg.h> #endif @@ -163,10 +167,6 @@ # include <sys/time.h> #endif -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif - #ifdef HAVE_SYS_VAR_H # include <sys/var.h> #endif diff --git a/src/libs/zbxsysinfo/solaris/kernel.c b/src/libs/zbxsysinfo/solaris/kernel.c index 1ab9772a..df1d2199 100644 --- a/src/libs/zbxsysinfo/solaris/kernel.c +++ b/src/libs/zbxsysinfo/solaris/kernel.c @@ -25,7 +25,7 @@ int KERNEL_MAXPROC(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { - int result = SYSINFO_RET_FAIL; + int ret = SYSINFO_RET_FAIL; kstat_ctl_t *kc; kstat_t *kt; struct var *v; @@ -48,13 +48,13 @@ int KERNEL_MAXPROC(const char *cmd, const char *param, unsigned flags, AGENT_RES /* int v_proc; Max processes system wide */ result->type |= AR_DOUBLE; result->dbl = (double)v->v_proc; - result = SYSINFO_RET_OK; + ret = SYSINFO_RET_OK; } } kstat_close(kc); } - return result; + return ret; } int KERNEL_MAXFILES(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) |