why not use macro to get the address of sdshdr?
オープン
- 主要言語
- C
- スター
- 5.6k
- フォーク
- 510
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I find that almost in every function, you write "struct sdshdr _sh = (void_)(s - sizeof *sh);" to get the address of sdshdr, I wonder why don't you make it macro?
Like this :
#define SDS_ADDR(s) (void *)((s) - sizeof(struct sdshdr))
struct sdshdr *sh = SDS_ADDR(s);
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。