Bug 208852 - lsearch(3) man page: missing terminating '"' on printf
Summary: lsearch(3) man page: missing terminating '"' on printf
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Warren Block
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-17 07:38 UTC by Loïc Bartoletti
Modified: 2016-04-17 18:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer freebsd_triage 2016-04-17 07:38:16 UTC
Hello,

I've found an error into the example of lsearch man page.

All printf' functions are unterminated, using 0 instead of \n"

printf("Bad input0);
printf("Element found: %d0, *(int *)element);
printf("Element not found0);

Also, int argc, char**argv into main is useless.

Regards.
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-04-17 18:25:49 UTC
A commit references this bug:

Author: wblock
Date: Sun Apr 17 18:25:34 UTC 2016
New revision: 298156
URL: https://svnweb.freebsd.org/changeset/base/298156

Log:
  Fix markup on "\n" in printf so it renders correctly.

  PR:		208852
  Submitted by:	coder@tuxfamily.org
  MFC after:	1 week

Changes:
  head/lib/libc/stdlib/lsearch.3