projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b36dc8
)
Use sizeof
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Thu, 26 Jun 2014 08:17:11 +0000
(09:17 +0100)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Thu, 26 Jun 2014 08:17:17 +0000
(09:17 +0100)
src/lib/debug.c
patch
|
blob
|
history
diff --git
a/src/lib/debug.c
b/src/lib/debug.c
index
3d1b1a4
..
0c6235e
100644
(file)
--- a/
src/lib/debug.c
+++ b/
src/lib/debug.c
@@
-165,7
+165,7
@@
static int fr_debugger_attached(void)
ret = 1;
/* Something is already attached */
- if (write(from_child[1], &ret,
1
) < 0) {
+ if (write(from_child[1], &ret,
sizeof(ret)
) < 0) {
fprintf(stderr, "Writing ptrace status to parent failed: %s", fr_syserror(errno));
}
@@
-180,7
+180,7
@@
static int fr_debugger_attached(void)
* This read may be interrupted by pattach,
* which is why we need the loop.
*/
- while ((read(from_child[0], &ret,
1
) < 0) && (errno == EINTR));
+ while ((read(from_child[0], &ret,
sizeof(ret)
) < 0) && (errno == EINTR));
/* Ret not updated */
if (ret < 0) {