why not use macro to get the address of sdshdr?
Offen
- Vorherrschende Sprache
- C
- Sterne
- 5.6k
- Forks
- 510
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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);
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.