Silence a CI warning regarding the use of strcpy().

While this is a false positive (a sufficiently large buffer has been
allocated in the line above), the use of strdup() simplifies and clarifies
the code.

MFC after:	2 weeks
This commit is contained in:
se 2019-01-22 13:11:15 +00:00
parent bb4c46d45b
commit e1fb642c4c

View File

@ -241,8 +241,7 @@ get_font(void)
if (strcmp(buf, "NO")) {
if (fnt)
free(fnt);
fnt = (char *) malloc(strlen(buf) + 1);
strcpy(fnt, buf);
fnt = strdup(buf);
}
}
}