projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b059b8
)
fwrite returns the number of items written, not the number of bytes.
author
pacman
<pacman>
Sun, 7 Jan 2001 07:01:55 +0000
(07:01 +0000)
committer
pacman
<pacman>
Sun, 7 Jan 2001 07:01:55 +0000
(07:01 +0000)
fwrite(w,x,y,z) ~= write(fileno(z),w,x*y)/x
src/modules/rlm_unix/rlm_unix.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_unix/rlm_unix.c
b/src/modules/rlm_unix/rlm_unix.c
index
c7c1f9b
..
9dd91ed
100644
(file)
--- a/
src/modules/rlm_unix/rlm_unix.c
+++ b/
src/modules/rlm_unix/rlm_unix.c
@@
-599,7
+599,7
@@
static int unix_accounting(void *instance, REQUEST *request)
* return RLM_MODULE_FAIL ..
*/
if ((fp = fopen(inst->radwtmp, "a")) != NULL) {
- if ((fwrite(&ut, sizeof(ut), 1, fp)) !=
sizeof(ut)
) {
+ if ((fwrite(&ut, sizeof(ut), 1, fp)) !=
1
) {
fclose(fp);
return RLM_MODULE_FAIL;
}