diff options
Diffstat (limited to 'src/tet3/dtet2lib')
-rw-r--r-- | src/tet3/dtet2lib/maperr.c | 7 | ||||
-rw-r--r-- | src/tet3/dtet2lib/unmaperr.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/tet3/dtet2lib/maperr.c b/src/tet3/dtet2lib/maperr.c index fc29338e..1d6ee6cc 100644 --- a/src/tet3/dtet2lib/maperr.c +++ b/src/tet3/dtet2lib/maperr.c @@ -57,15 +57,16 @@ register int errnum; { register struct errmap *ep, *ee; - for (ep = tet_errmap, ee = &tet_errmap[tet_Nerrmap]; ep < ee; ep++) - if (errnum == ep->em_errno) + for (ep = tet_errmap, ee = &tet_errmap[tet_Nerrmap]; ep < ee; ep++) { + if (errnum == ep->em_errno) { if (ep->em_repcode) return(ep->em_repcode); else break; + } + } error(errnum, ep < ee ? ep->em_errname : tet_errname(errnum), "has no equivalent DTET message reply code"); return(ER_ERR); } - diff --git a/src/tet3/dtet2lib/unmaperr.c b/src/tet3/dtet2lib/unmaperr.c index 15e28d07..dd63b6ff 100644 --- a/src/tet3/dtet2lib/unmaperr.c +++ b/src/tet3/dtet2lib/unmaperr.c @@ -56,8 +56,8 @@ register int repcode; { register struct errmap *ep, *ee; - for (ep = tet_errmap, ee = &tet_errmap[tet_Nerrmap]; ep < ee; ep++) - if (repcode == ep->em_repcode) + for (ep = tet_errmap, ee = &tet_errmap[tet_Nerrmap]; ep < ee; ep++) { + if (repcode == ep->em_repcode) { if (ep->em_errno >= 0) return(ep->em_errno); else { @@ -65,7 +65,8 @@ register int repcode; "has no equivalent local errno value"); break; } + } + } return(0); } - |