eina - and e3fl in general - stop using eina_error_get/set - useless really
This commit is contained in:
parent
666e2f66eb
commit
e56a483b5a
|
@ -90,19 +90,12 @@ main(int argc, const char *argv[])
|
|||
|
||||
// Modify or add an entry to the hash with eina_hash_set
|
||||
// Let's first add a new entry
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, "Raul Seixas",
|
||||
strdup("+55 01 234-56789"));
|
||||
if (!phone)
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (!err)
|
||||
{
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
printf("Error when setting phone for Raul Seixas\n");
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -113,7 +106,6 @@ main(int argc, const char *argv[])
|
|||
printf("\n");
|
||||
|
||||
// Now change the phone number
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, "Raul Seixas",
|
||||
strdup("+55 02 222-22222"));
|
||||
if (phone)
|
||||
|
@ -124,14 +116,8 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (err)
|
||||
printf("Error when changing phone for Raul Seixas\n");
|
||||
else
|
||||
{
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
|
||||
// There are many ways to iterate over our Phone book.
|
||||
|
|
|
@ -90,19 +90,12 @@ main(int argc, const char *argv[])
|
|||
|
||||
// Modify or add an entry to the hash with eina_hash_set
|
||||
// Let's first add a new entry
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, "Raul Seixas",
|
||||
strdup("+55 01 234-56789"));
|
||||
if (!phone)
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (!err)
|
||||
{
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
printf("Error when setting phone for Raul Seixas\n");
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -113,7 +106,6 @@ main(int argc, const char *argv[])
|
|||
printf("\n");
|
||||
|
||||
// Now change the phone number
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, "Raul Seixas",
|
||||
strdup("+55 02 222-22222"));
|
||||
if (phone)
|
||||
|
@ -124,14 +116,8 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (err)
|
||||
printf("Error when changing phone for Raul Seixas\n");
|
||||
else
|
||||
{
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
|
||||
// There are many ways to iterate over our Phone book.
|
||||
|
|
|
@ -90,19 +90,12 @@ main(int argc, const char *argv[])
|
|||
|
||||
// Modify or add an entry to the hash with eina_hash_set
|
||||
// Let's first add a new entry
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, "Raul Seixas",
|
||||
strdup("+55 01 234-56789"));
|
||||
if (!phone)
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (!err)
|
||||
{
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
printf("Error when setting phone for Raul Seixas\n");
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -113,7 +106,6 @@ main(int argc, const char *argv[])
|
|||
printf("\n");
|
||||
|
||||
// Now change the phone number
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, "Raul Seixas",
|
||||
strdup("+55 02 222-22222"));
|
||||
if (phone)
|
||||
|
@ -124,14 +116,8 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (err)
|
||||
printf("Error when changing phone for Raul Seixas\n");
|
||||
else
|
||||
{
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
printf("No previous phone found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
|
||||
// There are many ways to iterate over our Phone book.
|
||||
|
|
|
@ -92,19 +92,12 @@ main(int argc, const char *argv[])
|
|||
// Modify or add an entry to the hash with eina_hash_set
|
||||
// Let's first add a new entry
|
||||
int32_t id5 = 5;
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, &id5,
|
||||
strdup("+55 01 234-56789"));
|
||||
if (!phone)
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (!err)
|
||||
{
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
printf("Error when setting phone for Raul Seixas\n");
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -115,7 +108,6 @@ main(int argc, const char *argv[])
|
|||
printf("\n");
|
||||
|
||||
// Now change the phone number
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, &id5,
|
||||
strdup("+55 02 222-22222"));
|
||||
if (phone)
|
||||
|
@ -126,14 +118,8 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (err)
|
||||
printf("Error when changing phone for id5\n");
|
||||
else
|
||||
{
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
|
||||
// There are many ways to iterate over our Phone book.
|
||||
|
|
|
@ -92,19 +92,12 @@ main(int argc, const char *argv[])
|
|||
// Modify or add an entry to the hash with eina_hash_set
|
||||
// Let's first add a new entry
|
||||
int64_t id5 = 5;
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, &id5,
|
||||
strdup("+55 01 234-56789"));
|
||||
if (!phone)
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (!err)
|
||||
{
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
printf("Error when setting phone for Raul Seixas\n");
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -115,7 +108,6 @@ main(int argc, const char *argv[])
|
|||
printf("\n");
|
||||
|
||||
// Now change the phone number
|
||||
eina_error_set(0);
|
||||
phone = eina_hash_set(phone_book, &id5,
|
||||
strdup("+55 02 222-22222"));
|
||||
if (phone)
|
||||
|
@ -126,14 +118,8 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (err)
|
||||
printf("Error when changing phone for id5\n");
|
||||
else
|
||||
{
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
printf("No previous phone found for id5. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
|
||||
// There are many ways to iterate over our Phone book.
|
||||
|
|
|
@ -105,7 +105,6 @@ main(int argc, const char *argv[])
|
|||
|
||||
// Modify or add an entry to the hash with eina_hash_set
|
||||
// Let's first add a new entry
|
||||
eina_error_set(0);
|
||||
Phone_Entry *p1 = malloc(sizeof(*p1));
|
||||
p1->name = "Raul Seixas";
|
||||
p1->number = "+55 01 234-56789";
|
||||
|
@ -113,14 +112,8 @@ main(int argc, const char *argv[])
|
|||
strdup("raulzito"));
|
||||
if (!nick)
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (!err)
|
||||
{
|
||||
printf("No previous nick found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
printf("Error when setting nick for Raul Seixas\n");
|
||||
printf("No previous nick found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -131,7 +124,6 @@ main(int argc, const char *argv[])
|
|||
printf("\n");
|
||||
|
||||
// Now change the nick
|
||||
eina_error_set(0);
|
||||
nick = eina_hash_set(phone_book, &p1,
|
||||
strdup("raulzao"));
|
||||
if (nick)
|
||||
|
@ -142,14 +134,8 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_Error err = eina_error_get();
|
||||
if (err)
|
||||
printf("Error when changing nick for Raul Seixas\n");
|
||||
else
|
||||
{
|
||||
printf("No previous nick found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
printf("No previous nick found for Raul Seixas. ");
|
||||
printf("Creating new entry.\n");
|
||||
}
|
||||
|
||||
// There are many ways to iterate over our Phone book.
|
||||
|
|
|
@ -65,8 +65,6 @@ _tz_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, cons
|
|||
{
|
||||
struct timezone v = *(struct timezone*)type_mem;
|
||||
|
||||
eina_error_set(0);
|
||||
|
||||
if (convert == EINA_VALUE_TYPE_UCHAR)
|
||||
{
|
||||
unsigned char other_mem = v.tz_minuteswest;
|
||||
|
@ -130,8 +128,6 @@ _tz_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, cons
|
|||
other_mem = buf; /* required due &buf == buf */
|
||||
return eina_value_type_pset(convert, convert_mem, &other_mem);
|
||||
}
|
||||
|
||||
eina_error_set(EINA_ERROR_VALUE_FAILED);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue