diff --git a/xcb-util/atom/atoms.gperf.m4 b/xcb-util/atom/atoms.gperf.m4 index 63c98db..83a2246 100644 --- a/xcb-util/atom/atoms.gperf.m4 +++ b/xcb-util/atom/atoms.gperf.m4 @@ -84,7 +84,7 @@ int GetAtomName(XCBConnection *c, XCBATO { static char buf[100]; const char *name = GetAtomNamePredefined(atom); - int len; + int namelen; XCBGetAtomNameCookie atomc; XCBGetAtomNameRep *atomr; if(name) @@ -97,11 +97,11 @@ int GetAtomName(XCBConnection *c, XCBATO atomr = XCBGetAtomNameReply(c, atomc, 0); if(!atomr) return 0; - len = XCBGetAtomNameNameLength(atomr); - if(len > sizeof(buf)) - len = sizeof(buf); - *lengthp = len; - memcpy(buf, XCBGetAtomNameName(atomr), len); + namelen = XCBGetAtomNameNameLength(atomr); + if(namelen > sizeof(buf)) + namelen = sizeof(buf); + *lengthp = namelen; + memcpy(buf, XCBGetAtomNameName(atomr), namelen); *namep = buf; free(atomr); return 1;