From a7cc3e4790a703d5df273adcb916f32ac214711b Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Wed, 26 Apr 2000 20:10:59 +0000 Subject: [PATCH] Bugzilla bug #37272: inet_addr() should return -1 rather than assert on failure. --- nsprpub/pr/src/md/mac/macsockotpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nsprpub/pr/src/md/mac/macsockotpt.c b/nsprpub/pr/src/md/mac/macsockotpt.c index f408d845626..7580bc5d681 100644 --- a/nsprpub/pr/src/md/mac/macsockotpt.c +++ b/nsprpub/pr/src/md/mac/macsockotpt.c @@ -1870,7 +1870,8 @@ PR_IMPLEMENT(unsigned long) inet_addr(const char *cp) _MD_FinishInitNetAccess(); err = OTInetStringToHost((char*) cp, &host); - PR_ASSERT(err == kOTNoError); + if (err != kOTNoError) + return -1; return host; }