applied Jukka's sizeof K&R compliance patch, applied Manuels' last-line printage proposal for stdin reading.

This commit is contained in:
arg@mig29
2006-11-26 14:26:53 +01:00
parent 27ef73507b
commit 61a1910f91
5 changed files with 16 additions and 14 deletions

View File

@ -361,12 +361,12 @@ updatetitle(Client *c) {
if(!name.nitems)
return;
if(name.encoding == XA_STRING)
strncpy(c->name, (char *)name.value, sizeof(c->name));
strncpy(c->name, (char *)name.value, sizeof c->name);
else {
if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success
&& n > 0 && *list)
{
strncpy(c->name, *list, sizeof(c->name));
strncpy(c->name, *list, sizeof c->name);
XFreeStringList(list);
}
}