diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-11-26 13:21:18 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-11-26 13:21:18 -0800 |
commit | 6f4560e2ad81736127d2d3544415a05d41e8a2a7 (patch) | |
tree | 6c53b2585d1081cf9296c09cd22acee1e9ac9a4f /info.c | |
parent | fab9dcb15024996ac3a4f94d65ba73f484820534 (diff) |
Use snprintf, strdup & remove instead of sprintf, malloc/strcpy & unlink
Diffstat (limited to 'info.c')
-rw-r--r-- | info.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -165,7 +165,7 @@ DisplayProps(ClientRec *client) AppendStr (&buffer, pprop->type); AppendStr (&buffer, "\n"); AppendStr (&buffer, "Num values: "); - sprintf (number, "%d", ListCount (pprop->values)); + snprintf (number, sizeof(number), "%d", ListCount (pprop->values)); AppendStr (&buffer, number); AppendStr (&buffer, "\n"); @@ -181,7 +181,7 @@ DisplayProps(ClientRec *client) value = *card8; AppendStr (&buffer, "Value 1: "); - sprintf (number, "%d", value); + snprintf (number, sizeof(number), "%d", value); AppendStr (&buffer, number); if (strcmp (pprop->name, SmRestartStyleHint) == 0) @@ -208,7 +208,7 @@ DisplayProps(ClientRec *client) pval = (PropValue *) pj->thing; AppendStr (&buffer, "Value "); - sprintf (number, "%d", propnum); + snprintf (number, sizeof(number), "%d", propnum); AppendStr (&buffer, number); AppendStr (&buffer, ": "); AppendStr (&buffer, (char *) pval->value); |