/[LeafOK_CVS]/lbbs/src/section_list.c
ViewVC logotype

Diff of /lbbs/src/section_list.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.28 by sysadm, Tue May 27 07:21:43 2025 UTC Revision 1.30 by sysadm, Thu May 29 00:52:09 2025 UTC
# Line 610  inline static void sid_to_str(int32_t si Line 610  inline static void sid_to_str(int32_t si
610          p_sid_str[i] = '\0';          p_sid_str[i] = '\0';
611  }  }
612    
613  SECTION_LIST *section_list_create(int32_t sid, const char *sname, const char *stitle, const char *master_name)  SECTION_LIST *section_list_create(int32_t sid, const char *sname, const char *stitle, const char *master_list)
614  {  {
615          SECTION_LIST *p_section;          SECTION_LIST *p_section;
616          char sid_str[SID_STR_LEN];          char sid_str[SID_STR_LEN];
# Line 633  SECTION_LIST *section_list_create(int32_ Line 633  SECTION_LIST *section_list_create(int32_
633    
634          p_section->sid = sid;          p_section->sid = sid;
635    
636          strncpy(p_section->sname, sname, sizeof(p_section->sname - 1));          strncpy(p_section->sname, sname, sizeof(p_section->sname) - 1);
637          p_section->sname[sizeof(p_section->sname - 1)] = '\0';          p_section->sname[sizeof(p_section->sname) - 1] = '\0';
638    
639          strncpy(p_section->stitle, stitle, sizeof(p_section->stitle - 1));          strncpy(p_section->stitle, stitle, sizeof(p_section->stitle) - 1);
640          p_section->stitle[sizeof(p_section->stitle - 1)] = '\0';          p_section->stitle[sizeof(p_section->stitle) - 1] = '\0';
641    
642          strncpy(p_section->master_name, master_name, sizeof(p_section->master_name - 1));          strncpy(p_section->master_list, master_list, sizeof(p_section->master_list) - 1);
643          p_section->master_name[sizeof(p_section->master_name - 1)] = '\0';          p_section->master_list[sizeof(p_section->master_list) - 1] = '\0';
644    
645          if (trie_dict_set(p_section_list_pool->p_trie_dict_section_by_name, sname, p_section_list_pool->section_count) != 1)          if (trie_dict_set(p_section_list_pool->p_trie_dict_section_by_name, sname, p_section_list_pool->section_count) != 1)
646          {          {


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1