linux源码阅读笔记 数组定义

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

static struct hd_struct{

      long start_sect;

      long nr_sects;

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

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

原文地址:https://www.cnblogs.com/elnino/p/4342204.html