View Issue Details

IDProjectCategoryView StatusLast Update
00014001003.1(2016/18)/Issue7+TC2System Interfacespublic2024-06-11 09:08
Reportermkerrisk Assigned To 
PrioritynormalSeverityEditorialTypeError
Status ClosedResolutionAccepted 
NameMichael Kerrisk
Organizationman7.org
User Reference
Sectiongetgroups()
Page Number1042
Line Number35515
Interp Status---
Final Accepted Text
Summary0001400: Typo in variable name (nogroups ==> ngroups)
DescriptionIn the EXAMPLES section of getgroups(), there is the following:

[[
gid_t *group;
int nogroups;
long ngroups_max;
ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1;
group = (gid_t *)malloc(ngroups_max *sizeof(gid_t));
ngroups = getgroups(ngroups_max, group);
]]

A variable called "nogroups" is declared, but later the variable used in line 35519 is called "ngroups". To fix this (in a way that employs variable names that are also consistent with line 35516), "nogroups" should be changed to "ngroups".

Note that the same issue is present in Issue 8, draft 1, and reported as https://austingroupbugs.net/view.php?id=1399
Desired Action In line 35515, change "nogroups" to "ngroups".
Tagstc3-2008

Relationships

related to 0001399 Closed Issue 8 drafts Typo in variable name (nogroups ==> ngroups) 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-09-17 06:10 mkerrisk New Issue
2020-09-17 06:10 mkerrisk Name => Michael Kerrisk
2020-09-17 06:10 mkerrisk Organization => man7.org
2020-09-17 06:10 mkerrisk Section => getgroups()
2020-09-17 06:10 mkerrisk Page Number => 1042
2020-09-17 06:10 mkerrisk Line Number => 35515
2020-09-17 06:29 Don Cragun Relationship added related to 0001399
2021-02-08 16:14 Don Cragun Interp Status => ---
2021-02-08 16:14 Don Cragun Status New => Resolved
2021-02-08 16:14 Don Cragun Resolution Open => Accepted
2021-02-08 16:14 Don Cragun Tag Attached: tc3-2008
2021-02-23 15:35 geoffclare Status Resolved => Applied
2024-06-11 09:08 agadmin Status Applied => Closed