summaryrefslogtreecommitdiff
path: root/actions.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-05-09 11:19:33 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-05-09 11:19:33 -0700
commitaf90a105ec97c6d856d2e8a80e8822c3e192d1e9 (patch)
tree88e8a1428621f6dd10eb7c37370723d2e6a1b7e8 /actions.c
parent9ffefd5b3d38e9ed2b5ed59bc50e8a7da761fb77 (diff)
Replace remaining sprintf calls with snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'actions.c')
-rw-r--r--actions.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/actions.c b/actions.c
index b5e1338..800839d 100644
--- a/actions.c
+++ b/actions.c
@@ -188,8 +188,7 @@ PopdownFileDialogAction(Widget w, XEvent *event,
Boolean val;
if (*num_params != 1) {
- sprintf(buf, res_labels[2],
- "PopdownFileDialog");
+ snprintf(buf, sizeof(buf), res_labels[2], "PopdownFileDialog");
SetMessage(global_screen_data.info_label, buf);
return;
@@ -202,8 +201,7 @@ PopdownFileDialogAction(Widget w, XEvent *event,
else if (streq(buf, "okay"))
val = TRUE;
else {
- sprintf(buf, res_labels[1],
- "PopdownFileDialog");
+ snprintf(buf, sizeof(buf), res_labels[1], "PopdownFileDialog");
SetMessage(global_screen_data.info_label, buf);
return;
@@ -284,8 +282,7 @@ CheckAndFindEntry(String action_name, String *params, Cardinal num_params,
int i;
if (num_params != 1) {
- sprintf(buf, res_labels[2],
- action_name);
+ snprintf(buf, sizeof(buf), res_labels[2], action_name);
SetMessage(global_screen_data.info_label, buf);
return(FALSE);
}
@@ -297,8 +294,7 @@ CheckAndFindEntry(String action_name, String *params, Cardinal num_params,
return(TRUE);
}
- sprintf(buf,res_labels[3],
- action_name);
+ snprintf(buf, sizeof(buf), res_labels[3], action_name);
for (i = 0; i < num_table; ) {
strcat(buf, table[i++].name);