diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-09-04 10:56:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-09-04 12:06:27 -0400 |
commit | b39ee42904d9210ff3b6872d69535d32f588f907 (patch) | |
tree | f57ec8dbe163155bf9af8f608457d012ddb10b7e /src/lib/cc | |
parent | dc199f40fb03588af0bccb149a564e895e11d60d (diff) | |
download | tor-b39ee42904d9210ff3b6872d69535d32f588f907.tar.gz tor-b39ee42904d9210ff3b6872d69535d32f588f907.zip |
compat_compiler: fix documentation for STRUCT_VAR_P
Previously we had said that off_t was a reasonable type to hold the
result of offsetof(). That isn't so: ptrdiff_t is correct.
Diffstat (limited to 'src/lib/cc')
-rw-r--r-- | src/lib/cc/compat_compiler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/cc/compat_compiler.h b/src/lib/cc/compat_compiler.h index a8d1593214..92301449e8 100644 --- a/src/lib/cc/compat_compiler.h +++ b/src/lib/cc/compat_compiler.h @@ -195,7 +195,7 @@ * structure <b>st</b>. Example: * <pre> * struct a { int foo; int bar; } x; - * off_t bar_offset = offsetof(struct a, bar); + * ptrdiff_t bar_offset = offsetof(struct a, bar); * int *bar_p = STRUCT_VAR_P(&x, bar_offset); * *bar_p = 3; * </pre> |