| To: | austin-group-l@xxxxxxxxxxxxx |
|---|---|
| Subject: | [1003.1(2008)/Issue 7 0000177]: mismatch between example description and code |
| From: | Austin Group Bug Tracker <noreply@xxxxxxxxxxxxx> |
| Date: | Wed, 4 Nov 2009 09:54:42 +0000 |
| Keywords: | [1003.1(2008)/Issue 7] System Interfaces |
A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=177 ====================================================================== Reported By: Don Cragun Assigned To: ajosey ====================================================================== Project: 1003.1(2008)/Issue 7 Issue ID: 177 Category: System Interfaces Type: Error Severity: Editorial Priority: normal Status: Under Review Name: Don Cragun Organization: N/A User Reference: strtok() example Section: strtok() Page Number: 2041 Line Number: 64700-64701 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2009-11-03 22:32 UTC Last Modified: 2009-11-04 09:54 UTC ====================================================================== Summary: mismatch between example description and code ====================================================================== ---------------------------------------------------------------------- (0000277) geoffclare (manager) - 2009-11-04 09:54 http://austingroupbugs.net/view.php?id=177#c277 ---------------------------------------------------------------------- We should fix the LINE_MAX problem in the example at the same time. Changing LINE_MAX to LINE_MAX+1 on line 64697 would work, but would still give the impression that it's okay to use static arrays to hold lines. (In general it isn't okay, because LINE_MAX is "runtime increasable" - the macro value in <limits.h> might be smaller than the true {LINE_MAX} limit.) A simple fix would be to avoid the problem by changing char line[LINE_MAX]; char *key, *data; to char *line, *key, *data; Also the struct element declared at lines 64692-5 is not used and should be deleted. Issue History Date Modified Username Field Change ====================================================================== 2009-11-03 22:32 Don Cragun New Issue 2009-11-03 22:32 Don Cragun Status New => Under Review 2009-11-03 22:32 Don Cragun Assigned To => ajosey 2009-11-03 22:32 Don Cragun Name => Don Cragun 2009-11-03 22:32 Don Cragun Organization => N/A 2009-11-03 22:32 Don Cragun User Reference => strtok() example 2009-11-03 22:32 Don Cragun Section => strtok() 2009-11-03 22:32 Don Cragun Page Number => 2041 2009-11-03 22:32 Don Cragun Line Number => 64700-64701 2009-11-03 22:32 Don Cragun Interp Status => --- 2009-11-04 09:54 geoffclare Note Added: 0000277 ====================================================================== |
| Previous by Date: | Re: fgets/strtok and LINE_MAX, Don Cragun |
|---|---|
| Next by Date: | [1003.1(2008)/Issue 7 0000177]: mismatch between example description and code, Austin Group Bug Tracker |
| Previous by Thread: | Re: [1003.1(2008)/Issue 7 0000177]: mismatch between example descriptionand code, shwaresyst |
| Next by Thread: | [1003.1(2008)/Issue 7 0000177]: mismatch between example description and code, Austin Group Bug Tracker |
| Indexes: | [Date] [Thread] [All Lists] |