Anonymous | Login | 2024-05-05 20:36 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000232 | [1003.1(2008)/Issue 7] System Interfaces | Editorial | Error | 2010-03-31 10:24 | 2013-04-16 13:06 | ||
Reporter | nsitbon | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Nicolas Sitbon | ||||||
Organization | DenyAll | ||||||
User Reference | |||||||
Section | fread() function | ||||||
Page Number | 913 | ||||||
Line Number | 30545 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | Note: 0000407 | ||||||
Summary | 0000232: wrong example for fread() call | ||||||
Description |
in http://www.opengroup.org/onlinepubs/9699919799/functions/fread.html, [^] in the "examples" section, the fread() call look like this: bytes_read = fread(buf, sizeof(buf), 1, fp); the 2nd and 3rd arguments are inverted, so the returned value (number of elements successfully read) doesn't match the number of elements passed to the function. |
||||||
Desired Action |
replace the example with: bytes_read = fread(buf, 1, sizeof(buf), fp); or better: bytes_read = fread(buf, sizeof(*buf), sizeof(buf), fp); |
||||||
Tags | tc1-2008 | ||||||
Attached Files | |||||||
|
Relationships | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2010-03-31 10:24 | nsitbon | New Issue | |
2010-03-31 10:24 | nsitbon | Status | New => Under Review |
2010-03-31 10:24 | nsitbon | Assigned To | => ajosey |
2010-03-31 10:24 | nsitbon | Name | => Nicolas Sitbon |
2010-03-31 10:24 | nsitbon | Organization | => DenyAll |
2010-03-31 10:24 | nsitbon | Section | => fread() function |
2010-03-31 10:24 | nsitbon | Page Number | => 0 |
2010-03-31 10:24 | nsitbon | Line Number | => 0 |
2010-03-31 10:25 | nsitbon | Issue Monitored: nsitbon | |
2010-03-31 10:47 | geoffclare | Note Added: 0000407 | |
2010-03-31 23:20 | Don Cragun | Page Number | 0 => 913 |
2010-03-31 23:20 | Don Cragun | Line Number | 0 => 30545 |
2010-03-31 23:20 | Don Cragun | Interp Status | => --- |
2010-04-15 15:42 | geoffclare | Final Accepted Text | => Note: 0000407 |
2010-04-15 15:42 | geoffclare | Status | Under Review => Resolved |
2010-04-15 15:42 | geoffclare | Resolution | Open => Accepted As Marked |
2010-08-27 12:30 | ajosey | Tag Attached: tc1-2008 | |
2013-04-16 13:06 | ajosey | Status | Resolved => Closed |
2015-02-23 09:37 | geoffclare | Relationship added | has duplicate 0000926 |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |