why not use macro to get the address of sdshdr?
Aperta
- Lingua principale
- C
- Stelle
- 5.6k
- Fork
- 510
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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);
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.