From ab73e5c71e4131dd25681cf8492b7d47f751edea Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 7 Aug 2006 16:34:57 +0000 Subject: Better messages when an OID is too short. --- bsnmp/asn1.c | 2 +- common/config-parser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsnmp/asn1.c b/bsnmp/asn1.c index 8a206ee..be5e2a6 100644 --- a/bsnmp/asn1.c +++ b/bsnmp/asn1.c @@ -632,7 +632,7 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid *oid) oidlen = 2; } else if (oid->len == 1) { /* illegal */ - asn_error(b, "short oid"); + asn_error(NULL, "short oid"); if (oid->subs[0] > 2) asn_error(NULL, "oid[0] too large (%u)", oid->subs[0]); err = ASN_ERR_RANGE; diff --git a/common/config-parser.c b/common/config-parser.c index c096104..63c1bbb 100644 --- a/common/config-parser.c +++ b/common/config-parser.c @@ -354,7 +354,7 @@ cfg_parse_uri (char *uri, char** scheme, char** host, char** user, char** path) if(!*host[0]) return "invalid uri: no host name found"; - if(!uri || !uri[0] || !uri[1]) + if(!uri || !uri[0]) return "invalid uri: no path found"; *path = uri; -- cgit v1.2.3