diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-01-06 20:07:40 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-01-06 20:07:40 -0800 |
commit | 2785ef0c967571977b78490eb501c5f9da91d48c (patch) | |
tree | 6e253472038ffb4d8015970400b0762380686916 | |
parent | 05c9c12b6491708bc9ed9ea6b7a5321928d5ac93 (diff) |
Replace malloc(strlen) + strcpy() with strdup()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xwud.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -376,9 +376,7 @@ main(int argc, char *argv[]) mask = VisualScreenMask; if (vis) { - char *vt; - vt = malloc(strlen(vis) + 1); - strcpy(vt, vis); + char *vt = strdup(vis); Latin1Upper(vt); if (strcmp(vt, "STATICGRAY") == 0) { vinfo.class = StaticGray; |