git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
54fd3e5
)
Changed flist_init() to use offsetof().
author
Wayne Davison
<wayned@samba.org>
Tue, 10 Feb 2004 17:28:31 +0000
(17:28 +0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 10 Feb 2004 17:28:31 +0000
(17:28 +0000)
flist.c
patch
|
blob
|
history
diff --git
a/flist.c
b/flist.c
index 415de19bab2eb42982d48219a4cc2ac80e8dc2cf..873ffb8b001c8efc88c4e3ecdd2aa9d1f109d2ef 100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-81,7
+81,7
@@
void init_flist(void)
struct file_struct f;
/* Figure out how big the file_struct is without trailing padding */
struct file_struct f;
/* Figure out how big the file_struct is without trailing padding */
- file_struct_len =
((char*)&f.flags - (char*)&f
) + sizeof f.flags;
+ file_struct_len =
offsetof(struct file_struct, flags
) + sizeof f.flags;
}
}
@@
-1175,8
+1175,7
@@
struct file_list *send_file_list(int f, int argc, char *argv[])
finish_filelist_progress(flist);
}
finish_filelist_progress(flist);
}
- if (flist->hlink_pool)
- {
+ if (flist->hlink_pool) {
pool_destroy(flist->hlink_pool);
flist->hlink_pool = NULL;
}
pool_destroy(flist->hlink_pool);
flist->hlink_pool = NULL;
}