I recommend making the function name macro into a function-like macro instead of an object-like macro — give it an empty argument list. Also, it is usually best to keep the logic positive, so use
#ifdef rather than
#ifndef. This is hardly critical here, but in more complex situations, it is a good guideline to follow.
These observations lead to:
#define ptrValues() ptrValuesLocal()
#define ptrValues() ptrvaluesRemote()
ptrLinks = (struct sLinkDescriptionLayout*) ptrValues();
Personally, I would also have:
typedef struct sLinkDescriptionLayout sLinkDescriptionLayout;
Then I wouldn't need the
struct in the cast:
ptrLinks = (sLinkDescriptionLayout *)ptrValues();
I'd probably go for a shorter name, too, (perhaps
LinkDesc, but it depends on what the other names in the code are) but that's very much less critical.