rem: suffix = wmalloc(strlen(wwin->wm_class)+strlen(wwin->wm_instance)+2); sprintf(suffix, "%s.%s", wwin->wm_instance, wwin->wm_class);
add: int len = strlen(wwin->wm_class)+strlen(wwin->wm_instance)+2; suffix = wmalloc(len); snprintf(suffix, len, "%s.%s", wwin->wm_instance, wwin->wm_class);
context: getnameforicon(WWindow *wwin){    char *prefix, *suffix;    char *path;    int len;        if (wwin->wm_class && wwin->wm_instance) {	suffix = wmalloc(strlen(wwin->wm_class)+strlen(wwin->wm_instance)+2);	sprintf(suffix, "%s.%s", wwin->wm_instance, wwin->wm_class);    } else if (wwin->wm_class) {	suffix = wmalloc(strlen(wwin->wm_class)+1);	strcpy(suffix, wwin->wm_class);    } else if (wwin->wm_instance) {	suffix = wmalloc(strlen(wwin->wm_instance)+1);	strcpy(suffix, wwin->wm_instance);    } else {	return NULL;    }    prefix = wusergnusteppath();    len = strlen(prefix)+64+strlen(suffix);    path = wmalloc(len+1);    sprintf(path, "%s/.AppInfo", prefix);    if (access(path, F_OK)!=0) {	if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR)) {	    wsyserror(_("could not create directory %s"), path);	    wfree(path);	    wfree(suffix);	    return NULL;	}    }    strcat(path, "/WindowMaker");    if (access(path, F_OK)!=0) {	if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR)!=0) {	    wsyserror(_("could not create directory %s"), path);	    wfree(path);	    wfree(suffix);	    return NULL;	}    }    strcat(path, "/");    strcat(path, suffix);    strcat(path, ".xpm");    wfree(suffix);    return path;}