don't need to check alloca result

SVN revision: 74811
This commit is contained in:
Mike Blumenkrantz 2012-08-02 16:26:05 +00:00
parent 1044ea8316
commit 2f880d7c7c
1 changed files with 23 additions and 32 deletions

View File

@ -701,8 +701,6 @@ _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++)
{
@ -714,7 +712,6 @@ _dialog_scrolltext_create(Evas *evas, char *title, Ecore_Exe_Event_Data_Line *li
if (lines[max_lines].line) strcat(text, trunc_note);
e_widget_textblock_plain_set(obj, text);
}
e_widget_size_min_set(obj, 240, 120);
e_widget_framelist_object_append(os, obj);
@ -891,8 +888,6 @@ _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++)
{
@ -903,7 +898,6 @@ _dialog_save_cb(void *data __UNUSED__, void *data2)
snprintf(buffer, sizeof(buffer), "Output Data:\n%s\n\n", text);
fwrite(buffer, sizeof(char), strlen(buffer), f);
}
}
else
{
snprintf(buffer, sizeof(buffer), "Output Data:\n\tThere was no output\n\n");
@ -920,8 +914,6 @@ _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++)
{
@ -932,7 +924,6 @@ _dialog_save_cb(void *data __UNUSED__, void *data2)
snprintf(buffer, sizeof(buffer), "Error Logs:\n%s\n", text);
fwrite(buffer, sizeof(char), strlen(buffer), f);
}
}
else
{
snprintf(buffer, sizeof(buffer), "Error Logs:\n\tThere was no error message\n");