]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/bsearch.3
bsearch.3: EXAMPLES: Separate struct and variable definitions
[thirdparty/man-pages.git] / man3 / bsearch.3
index ede91e3790afb5a0bc1aa3c5fc8ccc565f8d0994..cf5fa7a0abb7ca284a1ce944b355fe6d9bd2138d 100644 (file)
@@ -89,9 +89,11 @@ then retrieves desired elements using
 #include <string.h>
 
 struct mi {
-    int nr;
-    char *name;
-} months[] = {
+    int         nr;
+    const char  *name;
+};
+
+static struct mi  months[] = {
     { 1, "jan" }, { 2, "feb" }, { 3, "mar" }, { 4, "apr" },
     { 5, "may" }, { 6, "jun" }, { 7, "jul" }, { 8, "aug" },
     { 9, "sep" }, {10, "oct" }, {11, "nov" }, {12, "dec" }