Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hw/kdrive/ephyr/hostx.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#if (EPHYR_WANT_DEBUG)
#define EPHYR_DBG(x, a...) \
fprintf(stderr, __FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a)
fprintf(stderr, __FILE__ ":%d,%s() " (x) "\n", __LINE__, __func__, ##a)
#else
#define EPHYR_DBG(x, a...) do {} while (0)
#endif
Expand Down
2 changes: 1 addition & 1 deletion hw/kdrive/fbdev/fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ fbdevScreenInitialize(KdScreenInfo * screen, FbdevScrPriv * scrpriv)
case FB_VISUAL_TRUECOLOR:
case FB_VISUAL_DIRECTCOLOR:
screen->fb.visuals = (1 << TrueColor);
#define Mask(o,l) (((1 << l) - 1) << o)
#define Mask(o,l) (((1 << (l)) - 1) << (o))
screen->fb.redMask = Mask (priv->var.red.offset, priv->var.red.length);
screen->fb.greenMask =
Mask (priv->var.green.offset, priv->var.green.length);
Expand Down
4 changes: 2 additions & 2 deletions hw/kdrive/linux/evdev/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

#define BITS_PER_LONG (sizeof(long) * 8)
#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
#define ISBITSET(x,y) ((x)[LONG(y)] & BIT(y))
#define ISBITSET(x,y) ((x)[LONG((y))] & BIT((y)))
#define OFF(x) ((x)%BITS_PER_LONG)
#define LONG(x) ((x)/BITS_PER_LONG)
#define BIT(x) (1 << OFF(x))
#define BIT(x) (1 << OFF((x)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function/Macro parentheses already serve as parentheses.


typedef struct _kevdev {
/* current device state */
Expand Down
4 changes: 2 additions & 2 deletions hw/kdrive/src/kdrive.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ extern const KdOsFuncs *kdOsFuncs;
#define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey))
#define KdSetScreenPriv(pScreen,v) \
dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v)
#define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen)
dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, (v))
#define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv((pScreen))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function parentheses already serve as parentheses.


/* kcmap.c */
void
Expand Down
4 changes: 2 additions & 2 deletions hw/kdrive/src/kinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#define DEV_INPUT_EVENT_PREFIX_LEN (sizeof(DEV_INPUT_EVENT_PREFIX) - 1)
#endif

#define AtomFromName(x) MakeAtom(x, strlen(x), 1)
#define AtomFromName(x) MakeAtom((x), strlen((x)), 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function/Macro parentheses already serve as parentheses.


#define KD_KEY_COUNT 248
#define KD_MIN_KEYCODE 8
Expand Down Expand Up @@ -2120,7 +2120,7 @@ KdWakeupHandler(ScreenPtr pScreen, int result)
KdProcessSwitch();
}

#define KdScreenOrigin(pScreen) (&(KdGetScreenPriv(pScreen)->screen->origin))
#define KdScreenOrigin(pScreen) (&(KdGetScreenPriv((pScreen))->screen->origin))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function/Macro parentheses already serve as parentheses.


static Bool
KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
Expand Down
2 changes: 1 addition & 1 deletion hw/kdrive/src/kxv.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static unsigned long PortResource = 0;
dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey))

#define GET_KDXV_SCREEN(pScreen) \
((KdXVScreenPtr)(dixGetPrivate(&pScreen->devPrivates, &KdXVScreenPrivateKey)))
((KdXVScreenPtr)(dixGetPrivate(&(pScreen)->devPrivates, &KdXVScreenPrivateKey)))

#define GET_KDXV_WINDOW(pWin) ((KdXVWindowPtr) \
dixLookupPrivate(&(pWin)->devPrivates, KdXVWindowKey))
Expand Down
Loading