diff options
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2002-11-11 22:15:55 +0000 |
---|---|---|
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2002-11-11 22:15:55 +0000 |
commit | fb38088231efc4fc87308f54713ab91f33378c90 (patch) | |
tree | 6a6579cefb28aeebe60fd71d94deec558d927bc7 | |
parent | fd59a578f5847c4d52ebab5d2a073c280f4a4b8c (diff) | |
download | monitoring-plugins-fb38088231efc4fc87308f54713ab91f33378c90.tar.gz |
should use asprintf
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@187 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | plugins/check_snmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 80366b81..a8ee06fd 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -35,8 +35,8 @@ [-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\ [-l label] [-u units] [-p port-number] [-d delimiter]\n\ [-D output-delimiter] [-m miblist] [-P snmp version]\n\ - [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\ - [-X privpasswd]\n" + [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\ + [-X privpasswd]\n" #define LONGOPTIONS "\ -H, --hostname=HOST\n\ @@ -726,7 +726,7 @@ validate_arguments () asprintf(&proto, "%s", "3"); if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) { - authpriv = ssprintf(authpriv, "%s", "-l noAuthNoPriv" ); + asprintf(&authpriv, "%s", "-l noAuthNoPriv" ); } else if ( strcmp(seclevel, "authNoPriv") == 0 ) { if ( secname == NULL || authpasswd == NULL) { @@ -734,7 +734,7 @@ validate_arguments () print_usage (); exit (STATE_UNKNOWN); } - authpriv = ssprintf(authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd); + asprintf(&authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd); } else if ( strcmp(seclevel, "authPriv") == 0 ) { if ( secname == NULL || authpasswd == NULL || privpasswd == NULL ) { @@ -742,7 +742,7 @@ validate_arguments () print_usage (); exit (STATE_UNKNOWN); } - authpriv = ssprintf(authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd); + asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd); } |