Commit b39ee429 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

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.
parent dc199f40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>