在阅读linux源码的过程中遇到了下面的略显奇怪的结构体数组定义。

static struct hd_struct{

      long start_sect;

      long nr_sects;

}hd[10]={{0,0},};

经测试,猜测应该是只对该数组的第一个元素进行初始化为{0,0},而其他元素不初始化

相关文章:

  • 2021-10-25
  • 2021-08-08
  • 2022-02-12
  • 2021-07-01
  • 2021-06-10
猜你喜欢
  • 2021-08-24
  • 2021-11-16
  • 2021-12-06
  • 2022-01-10
  • 2021-09-08
  • 2022-12-23
  • 2021-04-05
相关资源
相似解决方案