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.
This commit is contained in:
Nick Mathewson
2019-09-04 10:56:57 -04:00
parent dc199f40fb
commit b39ee42904
+1 -1
View File
@@ -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>