Module Name: src Committed By: mrg Date: Wed Sep 6 19:14:52 UTC 2023
Modified Files: src/sys/lib/libkern: libkern.h Log Message: fix the example for container_of(). needs to be a pointer into the containing structure, not the value of a pointer inside the structure. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/lib/libkern/libkern.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/lib/libkern/libkern.h diff -u src/sys/lib/libkern/libkern.h:1.144 src/sys/lib/libkern/libkern.h:1.145 --- src/sys/lib/libkern/libkern.h:1.144 Fri Dec 31 14:19:57 2021 +++ src/sys/lib/libkern/libkern.h Wed Sep 6 19:14:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: libkern.h,v 1.144 2021/12/31 14:19:57 riastradh Exp $ */ +/* $NetBSD: libkern.h,v 1.145 2023/09/06 19:14:52 mrg Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -335,7 +335,7 @@ tolower(int ch) * }; * * struct bar b; - * struct foo *fp = b.b_foo; + * struct foo *fp = &b.b_foo; * * Now we can get at b from fp by: *