chiark
/
gitweb
/
~ianmdlvl
/
adns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edbfeb9
)
Abort on EBADF, EFAULT. Correctly parse numeric errnos.
author
ian
<ian>
Tue, 12 Oct 1999 21:28:29 +0000
(21:28 +0000)
committer
ian
<ian>
Tue, 12 Oct 1999 21:28:29 +0000
(21:28 +0000)
regress/hcommon.c.m4
patch
|
blob
|
history
regress/hplayback.c.m4
patch
|
blob
|
history
diff --git
a/regress/hcommon.c.m4
b/regress/hcommon.c.m4
index b636a75d83410e7e53327744a2c76fb221693710..b64dbd7a32353c983ba9711d3810b1716e954b85 100644
(file)
--- a/
regress/hcommon.c.m4
+++ b/
regress/hcommon.c.m4
@@
-181,6
+181,8
@@
void Tvbpollfds(const struct pollfd *fds, int nfds) {
void Tvberrno(int e) {
const struct Terrno *te;
+ assert(e != EBADF);
+ assert(e != EFAULT);
for (te= Terrnos; te->n && te->v != e; te++);
if (te->n) Tvba(te->n);
else Tvbf("E#%d",e);
diff --git
a/regress/hplayback.c.m4
b/regress/hplayback.c.m4
index 6b08ac4a99818b8cef0e6e265e243b9614d4f7c9..908886957f7fea3285b64811b1bd753bce12cc3d 100644
(file)
--- a/
regress/hplayback.c.m4
+++ b/
regress/hplayback.c.m4
@@
-115,8
+115,8
@@
static int Perrno(const char *stuff) {
for (te= Terrnos; te->n && strcmp(te->n,stuff); te++);
if (te->n) return te->v;
- r= strtoul(stuff+
1
,&ep,10);
- if (ep) Psyntax("errno value not recognised, not numeric");
+ r= strtoul(stuff+
2
,&ep,10);
+ if (
*
ep) Psyntax("errno value not recognised, not numeric");
return r;
}