aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_exec.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-02 16:26:05 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-02 16:26:05 +0000
commit2f880d7c7c0e5b0a6dcdbf12e7dd4fdd22fd86d4 (patch)
tree4e105cf5da07d18c64df48fa4f1881f019f50e54 /src/bin/e_exec.c
parent1044ea83166d6ca3cec418553add787d501cbe16 (diff)
downloadenlightenment-2f880d7c7c0e5b0a6dcdbf12e7dd4fdd22fd86d4.tar.gz
enlightenment-2f880d7c7c0e5b0a6dcdbf12e7dd4fdd22fd86d4.tar.xz
enlightenment-2f880d7c7c0e5b0a6dcdbf12e7dd4fdd22fd86d4.zip
don't need to check alloca result
SVN revision: 74811
Diffstat (limited to 'src/bin/e_exec.c')
-rw-r--r--src/bin/e_exec.c53
1 files changed, 22 insertions, 31 deletions
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 4bdb88a62..ac6f991d0 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -701,20 +701,17 @@ _dialog_scrolltext_create(Evas *evas, char *title, Ecore_Exe_Event_Data_Line *li
max_lines = i;
text = alloca(tlen + 1);
- if (text)
+ text[0] = 0;
+ for (i = 0; i < max_lines; i++)
{
- text[0] = 0;
- for (i = 0; i < max_lines; i++)
- {
- strcat(text, lines[i].line);
- strcat(text, "\n");
- }
+ strcat(text, lines[i].line);
+ strcat(text, "\n");
+ }
- /* Append the warning about truncated output. */
- if (lines[max_lines].line) strcat(text, trunc_note);
+ /* Append the warning about truncated output. */
+ if (lines[max_lines].line) strcat(text, trunc_note);
- e_widget_textblock_plain_set(obj, text);
- }
+ e_widget_textblock_plain_set(obj, text);
e_widget_size_min_set(obj, 240, 120);
e_widget_framelist_object_append(os, obj);
@@ -891,18 +888,15 @@ _dialog_save_cb(void *data __UNUSED__, void *data2)
for (i = 0; cfdata->read->lines[i].line; i++)
tlen += cfdata->read->lines[i].size + 2;
text = alloca(tlen + 1);
- if (text)
+ text[0] = 0;
+ for (i = 0; cfdata->read->lines[i].line; i++)
{
- text[0] = 0;
- for (i = 0; cfdata->read->lines[i].line; i++)
- {
- strcat(text, "\t");
- strcat(text, cfdata->read->lines[i].line);
- strcat(text, "\n");
- }
- snprintf(buffer, sizeof(buffer), "Output Data:\n%s\n\n", text);
- fwrite(buffer, sizeof(char), strlen(buffer), f);
+ strcat(text, "\t");
+ strcat(text, cfdata->read->lines[i].line);
+ strcat(text, "\n");
}
+ snprintf(buffer, sizeof(buffer), "Output Data:\n%s\n\n", text);
+ fwrite(buffer, sizeof(char), strlen(buffer), f);
}
else
{
@@ -920,18 +914,15 @@ _dialog_save_cb(void *data __UNUSED__, void *data2)
for (i = 0; cfdata->error->lines[i].line; i++)
tlen += cfdata->error->lines[i].size + 1;
text = alloca(tlen + 1);
- if (text)
+ text[0] = 0;
+ for (i = 0; cfdata->error->lines[i].line; i++)
{
- text[0] = 0;
- for (i = 0; cfdata->error->lines[i].line; i++)
- {
- strcat(text, "\t");
- strcat(text, cfdata->error->lines[i].line);
- strcat(text, "\n");
- }
- snprintf(buffer, sizeof(buffer), "Error Logs:\n%s\n", text);
- fwrite(buffer, sizeof(char), strlen(buffer), f);
+ strcat(text, "\t");
+ strcat(text, cfdata->error->lines[i].line);
+ strcat(text, "\n");
}
+ snprintf(buffer, sizeof(buffer), "Error Logs:\n%s\n", text);
+ fwrite(buffer, sizeof(char), strlen(buffer), f);
}
else
{