diff --git a/swad_changelog.h b/swad_changelog.h index a67df9d99..24137ec7b 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -189,13 +189,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.111.11 (2016-12-29)" +#define Log_PLATFORM_VERSION "SWAD 16.111.12 (2016-12-29)" #define CSS_FILE "swad16.111.5.css" #define JS_FILE "swad16.101.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.111.12:Dec 29, 2016 Fixed minor bug in groups, reported by Coverity. (? lines) Version 16.111.11:Dec 29, 2016 Fixed minor bug inserting links to nicknames, reported by Coverity. (211149 lines) Version 16.111.10:Dec 29, 2016 Fixed minor bug in groups, reported by Coverity. (211146 lines) Version 16.111.9: Dec 29, 2016 Fixed bugs in lstat, reported by Coverity. (211138 lines) diff --git a/swad_enrollment.c b/swad_enrollment.c index fc1abee4b..8ffe70a72 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -1356,6 +1356,8 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role) Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); /***** Get the list of groups to which register/remove students *****/ + LstGrps.GrpCod = NULL; // Initialized to avoid bug reported by Coverity + LstGrps.NumGrps = 0; // Initialized to avoid bug reported by Coverity Grp_GetLstCodsGrpWanted (&LstGrps); /***** A student can't belong to more than one group when the type of group only allows to register in one group *****/ diff --git a/swad_group.c b/swad_group.c index b23fad195..49e54ddcb 100644 --- a/swad_group.c +++ b/swad_group.c @@ -577,8 +577,8 @@ void Grp_ChangeOtherUsrGrps (void) Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); /***** Get the list of groups to which register this user *****/ - // LstGrpsUsrWants.GrpCod = NULL; // Initialized to avoid bug reported by Coverity - // LstGrpsUsrWants.NumGrps = 0; // Initialized to avoid bug reported by Coverity + LstGrpsUsrWants.GrpCod = NULL; // Initialized to avoid bug reported by Coverity + LstGrpsUsrWants.NumGrps = 0; // Initialized to avoid bug reported by Coverity Grp_GetLstCodsGrpWanted (&LstGrpsUsrWants); /***** A student can not be enrolled in more than one group @@ -937,8 +937,8 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr MultipleEnrollment = Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment; /***** Query in the database the group codes of any group of this type the student belongs to *****/ - // LstGrpsHeBelongs.NumGrps = 0; // Initialized to avoid bug reported by Coverity - // LstGrpsHeBelongs.GrpCod = NULL;// Initialized to avoid bug reported by Coverity + LstGrpsHeBelongs.NumGrps = 0; // Initialized to avoid bug reported by Coverity + LstGrpsHeBelongs.GrpCod = NULL; // Initialized to avoid bug reported by Coverity Grp_GetLstCodGrpsUsrBelongs (Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod, UsrDat->UsrCod,&LstGrpsHeBelongs);