summaryrefslogtreecommitdiff
path: root/src/xsettings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsettings.c')
-rw-r--r--src/xsettings.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/xsettings.c b/src/xsettings.c
index bdf9f2876be..8fe82fec74b 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -336,9 +336,6 @@ get_prop_window (struct x_display_info *dpyinfo)
XUngrabServer (dpy);
}
-#define SWAP32(nr) (((nr) << 24) | (((nr) << 8) & 0xff0000) \
- | (((nr) >> 8) & 0xff00) | ((nr) >> 24))
-#define SWAP16(nr) (((nr) << 8) | ((nr) >> 8))
#define PAD(nr) (((nr) + 3) & ~3)
/* Parse xsettings and extract those that deal with Xft.
@@ -408,7 +405,7 @@ parse_settings (unsigned char *prop,
if (bytes < 12) return BadLength;
memcpy (&n_settings, prop+8, 4);
- if (my_bo != that_bo) n_settings = SWAP32 (n_settings);
+ if (my_bo != that_bo) n_settings = swap32 (n_settings);
bytes_parsed = 12;
memset (settings, 0, sizeof (*settings));
@@ -430,7 +427,7 @@ parse_settings (unsigned char *prop,
memcpy (&nlen, prop+bytes_parsed, 2);
bytes_parsed += 2;
- if (my_bo != that_bo) nlen = SWAP16 (nlen);
+ if (my_bo != that_bo) nlen = swap16 (nlen);
if (bytes_parsed+nlen > bytes) return BadLength;
to_cpy = nlen > 127 ? 127 : nlen;
memcpy (name, prop+bytes_parsed, to_cpy);
@@ -457,7 +454,7 @@ parse_settings (unsigned char *prop,
if (want_this)
{
memcpy (&ival, prop+bytes_parsed, 4);
- if (my_bo != that_bo) ival = SWAP32 (ival);
+ if (my_bo != that_bo) ival = swap32 (ival);
}
bytes_parsed += 4;
break;
@@ -466,7 +463,7 @@ parse_settings (unsigned char *prop,
if (bytes_parsed+4 > bytes) return BadLength;
memcpy (&vlen, prop+bytes_parsed, 4);
bytes_parsed += 4;
- if (my_bo != that_bo) vlen = SWAP32 (vlen);
+ if (my_bo != that_bo) vlen = swap32 (vlen);
if (want_this)
{
to_cpy = vlen > 127 ? 127 : vlen;