diff options
Diffstat (limited to '')
126 files changed, 523 insertions, 523 deletions
diff --git a/legacy/ecore/src/bin/ecore_config.c b/legacy/ecore/src/bin/ecore_config.c index 8bf29882dd..b4973d91d1 100644 --- a/legacy/ecore/src/bin/ecore_config.c +++ b/legacy/ecore/src/bin/ecore_config.c | |||
@@ -36,8 +36,8 @@ pathcmp(const char *s1, const char *s2) | |||
36 | // order folders before files | 36 | // order folders before files |
37 | s1d = strchr(s1, '/'); | 37 | s1d = strchr(s1, '/'); |
38 | s2d = strchr(s2, '/'); | 38 | s2d = strchr(s2, '/'); |
39 | if (s1d != NULL && s2d == NULL) return -1; | 39 | if (s1d && !s2d) return -1; |
40 | if (s1d == NULL && s2d != NULL) return 1; | 40 | if (!s1d && s2d) return 1; |
41 | 41 | ||
42 | return strcmp(s1, s2); | 42 | return strcmp(s1, s2); |
43 | } | 43 | } |
@@ -47,7 +47,7 @@ del(const char *key) | |||
47 | { | 47 | { |
48 | Ecore_Config_Prop *e; | 48 | Ecore_Config_Prop *e; |
49 | e = ecore_config_get(key); | 49 | e = ecore_config_get(key); |
50 | if(e == NULL) return -1; | 50 | if(!e) return -1; |
51 | 51 | ||
52 | ecore_config_dst(e); | 52 | ecore_config_dst(e); |
53 | return 0; | 53 | return 0; |
@@ -258,7 +258,7 @@ main(int argc, char * const argv[]) | |||
258 | if(cmd == 's' && type == -1) | 258 | if(cmd == 's' && type == -1) |
259 | usage_and_exit(prog, 2, "You need to specify a command!"); | 259 | usage_and_exit(prog, 2, "You need to specify a command!"); |
260 | 260 | ||
261 | if(cmd != 'a' && key == NULL) | 261 | if(cmd != 'a' && !key) |
262 | usage_and_exit(prog, 2, "You need to specify key!"); | 262 | usage_and_exit(prog, 2, "You need to specify key!"); |
263 | 263 | ||
264 | if(ecore_config_init("econfig") != ECORE_CONFIG_ERR_SUCC) | 264 | if(ecore_config_init("econfig") != ECORE_CONFIG_ERR_SUCC) |
diff --git a/legacy/ecore/src/lib/ecore/ecore_exe.c b/legacy/ecore/src/lib/ecore/ecore_exe.c index 43b6cf1cc0..e8eec95f2f 100644 --- a/legacy/ecore/src/lib/ecore/ecore_exe.c +++ b/legacy/ecore/src/lib/ecore/ecore_exe.c | |||
@@ -430,7 +430,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data) | |||
430 | 430 | ||
431 | if (!exe_cmd) return NULL; | 431 | if (!exe_cmd) return NULL; |
432 | exe = calloc(1, sizeof(Ecore_Exe)); | 432 | exe = calloc(1, sizeof(Ecore_Exe)); |
433 | if (exe == NULL) return NULL; | 433 | if (!exe) return NULL; |
434 | 434 | ||
435 | if ((flags & ECORE_EXE_PIPE_AUTO) && (!(flags & ECORE_EXE_PIPE_ERROR)) | 435 | if ((flags & ECORE_EXE_PIPE_AUTO) && (!(flags & ECORE_EXE_PIPE_ERROR)) |
436 | && (!(flags & ECORE_EXE_PIPE_READ))) | 436 | && (!(flags & ECORE_EXE_PIPE_READ))) |
@@ -614,7 +614,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data) | |||
614 | ECORE_FD_READ, | 614 | ECORE_FD_READ, |
615 | _ecore_exe_data_error_handler, | 615 | _ecore_exe_data_error_handler, |
616 | exe, NULL, NULL); | 616 | exe, NULL, NULL); |
617 | if (exe->error_fd_handler == NULL) | 617 | if (!exe->error_fd_handler) |
618 | ok = 0; | 618 | ok = 0; |
619 | } | 619 | } |
620 | } | 620 | } |
@@ -635,7 +635,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data) | |||
635 | ECORE_FD_READ, | 635 | ECORE_FD_READ, |
636 | _ecore_exe_data_read_handler, | 636 | _ecore_exe_data_read_handler, |
637 | exe, NULL, NULL); | 637 | exe, NULL, NULL); |
638 | if (exe->read_fd_handler == NULL) | 638 | if (!exe->read_fd_handler) |
639 | ok = 0; | 639 | ok = 0; |
640 | } | 640 | } |
641 | } | 641 | } |
@@ -758,7 +758,7 @@ ecore_exe_send(Ecore_Exe * exe, const void *data, int size) | |||
758 | } | 758 | } |
759 | 759 | ||
760 | buf = realloc(exe->write_data_buf, exe->write_data_size + size); | 760 | buf = realloc(exe->write_data_buf, exe->write_data_size + size); |
761 | if (buf == NULL) return EINA_FALSE; | 761 | if (!buf) return EINA_FALSE; |
762 | 762 | ||
763 | exe->write_data_buf = buf; | 763 | exe->write_data_buf = buf; |
764 | memcpy((char *)exe->write_data_buf + exe->write_data_size, data, size); | 764 | memcpy((char *)exe->write_data_buf + exe->write_data_size, data, size); |
@@ -1388,7 +1388,7 @@ _ecore_exe_make_sure_its_dead(void *data) | |||
1388 | { | 1388 | { |
1389 | Ecore_Exe *exe = NULL; | 1389 | Ecore_Exe *exe = NULL; |
1390 | 1390 | ||
1391 | if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL) | 1391 | if ((exe = _ecore_exe_is_it_alive(dead->pid))) |
1392 | { | 1392 | { |
1393 | if (dead->cmd) | 1393 | if (dead->cmd) |
1394 | INF("Sending KILL signal to alledgedly dead %s (%d).", | 1394 | INF("Sending KILL signal to alledgedly dead %s (%d).", |
@@ -1420,7 +1420,7 @@ _ecore_exe_make_sure_its_really_dead(void *data) | |||
1420 | { | 1420 | { |
1421 | Ecore_Exe *exe = NULL; | 1421 | Ecore_Exe *exe = NULL; |
1422 | 1422 | ||
1423 | if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL) | 1423 | if ((exe = _ecore_exe_is_it_alive(dead->pid))) |
1424 | { | 1424 | { |
1425 | ERR("RUN! The zombie wants to eat your brains! And your CPU!"); | 1425 | ERR("RUN! The zombie wants to eat your brains! And your CPU!"); |
1426 | if (dead->cmd) | 1426 | if (dead->cmd) |
@@ -1549,10 +1549,10 @@ _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags) | |||
1549 | } | 1549 | } |
1550 | else if (use_sh) | 1550 | else if (use_sh) |
1551 | { /* We have to use a shell to run this. */ | 1551 | { /* We have to use a shell to run this. */ |
1552 | if (shell == NULL) | 1552 | if (!shell) |
1553 | { /* Find users preferred shell. */ | 1553 | { /* Find users preferred shell. */ |
1554 | shell = getenv("SHELL"); | 1554 | shell = getenv("SHELL"); |
1555 | if (shell == NULL) | 1555 | if (!shell) |
1556 | shell = "/bin/sh"; | 1556 | shell = "/bin/sh"; |
1557 | } | 1557 | } |
1558 | errno = 0; | 1558 | errno = 0; |
diff --git a/legacy/ecore/src/lib/ecore/ecore_exe_win32.c b/legacy/ecore/src/lib/ecore/ecore_exe_win32.c index 17448ade0c..30d7d3c25b 100644 --- a/legacy/ecore/src/lib/ecore/ecore_exe_win32.c +++ b/legacy/ecore/src/lib/ecore/ecore_exe_win32.c | |||
@@ -325,7 +325,7 @@ ecore_exe_send(Ecore_Exe *exe, const void *data, int size) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | buf = realloc(exe->pipe_write.data_buf, exe->pipe_write.data_size + size); | 327 | buf = realloc(exe->pipe_write.data_buf, exe->pipe_write.data_size + size); |
328 | if (buf == NULL) return 0; | 328 | if (!buf) return 0; |
329 | 329 | ||
330 | exe->pipe_write.data_buf = buf; | 330 | exe->pipe_write.data_buf = buf; |
331 | memcpy((char *)exe->pipe_write.data_buf + exe->pipe_write.data_size, data, size); | 331 | memcpy((char *)exe->pipe_write.data_buf + exe->pipe_write.data_size, data, size); |
diff --git a/legacy/ecore/src/lib/ecore/ecore_getopt.c b/legacy/ecore/src/lib/ecore/ecore_getopt.c index 1c1de8be3c..f00c46e513 100644 --- a/legacy/ecore/src/lib/ecore/ecore_getopt.c +++ b/legacy/ecore/src/lib/ecore/ecore_getopt.c | |||
@@ -500,11 +500,11 @@ _ecore_getopt_help_desc_choices(FILE *fp, const int base, const int total, int u | |||
500 | used = _ecore_getopt_help_line | 500 | used = _ecore_getopt_help_line |
501 | (fp, base, total, used, _("Choices: "), strlen(_("Choices: "))); | 501 | (fp, base, total, used, _("Choices: "), strlen(_("Choices: "))); |
502 | 502 | ||
503 | for (itr = desc->action_param.choices; *itr != NULL; itr++) | 503 | for (itr = desc->action_param.choices; *itr; itr++) |
504 | { | 504 | { |
505 | used = _ecore_getopt_help_line | 505 | used = _ecore_getopt_help_line |
506 | (fp, base, total, used, *itr, strlen(*itr)); | 506 | (fp, base, total, used, *itr, strlen(*itr)); |
507 | if (itr[1] != NULL) | 507 | if (itr[1]) |
508 | used = _ecore_getopt_help_line(fp, base, total, used, sep, seplen); | 508 | used = _ecore_getopt_help_line(fp, base, total, used, sep, seplen); |
509 | } | 509 | } |
510 | 510 | ||
@@ -587,7 +587,7 @@ _ecore_getopt_help_desc(FILE *fp, const Ecore_Getopt_Desc *desc) | |||
587 | static unsigned char | 587 | static unsigned char |
588 | _ecore_getopt_desc_is_sentinel(const Ecore_Getopt_Desc *desc) | 588 | _ecore_getopt_desc_is_sentinel(const Ecore_Getopt_Desc *desc) |
589 | { | 589 | { |
590 | return (desc->shortname == '\0') && (desc->longname == NULL); | 590 | return (desc->shortname == '\0') && (!desc->longname); |
591 | } | 591 | } |
592 | 592 | ||
593 | static void | 593 | static void |
@@ -618,7 +618,7 @@ ecore_getopt_help(FILE *fp, const Ecore_Getopt *parser) | |||
618 | if (argc < 1) | 618 | if (argc < 1) |
619 | { | 619 | { |
620 | ecore_app_args_get(&argc, &argv); | 620 | ecore_app_args_get(&argc, &argv); |
621 | if ((argc > 0) && (argv[0] != NULL)) | 621 | if ((argc > 0) && (argv[0])) |
622 | prog = argv[0]; | 622 | prog = argv[0]; |
623 | else | 623 | else |
624 | prog = parser->prog; | 624 | prog = parser->prog; |
@@ -1010,7 +1010,7 @@ _ecore_getopt_parse_choice(const Ecore_Getopt *parser __UNUSED__, const Ecore_Ge | |||
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | pchoice = desc->action_param.choices; | 1012 | pchoice = desc->action_param.choices; |
1013 | for (; *pchoice != NULL; pchoice++) | 1013 | for (; *pchoice; pchoice++) |
1014 | if (strcmp(*pchoice, arg_val) == 0) | 1014 | if (strcmp(*pchoice, arg_val) == 0) |
1015 | { | 1015 | { |
1016 | *val->strp = (char *)*pchoice; | 1016 | *val->strp = (char *)*pchoice; |
@@ -1021,10 +1021,10 @@ _ecore_getopt_parse_choice(const Ecore_Getopt *parser __UNUSED__, const Ecore_Ge | |||
1021 | (desc, _("invalid choice \"%s\". Valid values are: "), arg_val); | 1021 | (desc, _("invalid choice \"%s\". Valid values are: "), arg_val); |
1022 | 1022 | ||
1023 | pchoice = desc->action_param.choices; | 1023 | pchoice = desc->action_param.choices; |
1024 | for (; *pchoice != NULL; pchoice++) | 1024 | for (; *pchoice; pchoice++) |
1025 | { | 1025 | { |
1026 | fputs(*pchoice, stderr); | 1026 | fputs(*pchoice, stderr); |
1027 | if (pchoice[1] != NULL) | 1027 | if (pchoice[1]) |
1028 | fputs(", ", stderr); | 1028 | fputs(", ", stderr); |
1029 | } | 1029 | } |
1030 | 1030 | ||
@@ -1626,7 +1626,7 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a | |||
1626 | return -1; | 1626 | return -1; |
1627 | } | 1627 | } |
1628 | 1628 | ||
1629 | if ((argc < 1) || (argv == NULL)) | 1629 | if ((argc < 1) || (!argv)) |
1630 | ecore_app_args_get(&argc, &argv); | 1630 | ecore_app_args_get(&argc, &argv); |
1631 | 1631 | ||
1632 | if (argc < 1) | 1632 | if (argc < 1) |
@@ -1635,7 +1635,7 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a | |||
1635 | return -1; | 1635 | return -1; |
1636 | } | 1636 | } |
1637 | 1637 | ||
1638 | if (argv[0] != NULL) | 1638 | if (argv[0]) |
1639 | prog = argv[0]; | 1639 | prog = argv[0]; |
1640 | else | 1640 | else |
1641 | prog = parser->prog; | 1641 | prog = parser->prog; |
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c index 7530114af1..10a4fd3439 100644 --- a/legacy/ecore/src/lib/ecore/ecore_main.c +++ b/legacy/ecore/src/lib/ecore/ecore_main.c | |||
@@ -1315,7 +1315,7 @@ _ecore_main_win32_select(int nfds __UNUSED__, fd_set *readfds, fd_set *writefds, | |||
1315 | 1315 | ||
1316 | /* Wait for any message sent or posted to this queue */ | 1316 | /* Wait for any message sent or posted to this queue */ |
1317 | /* or for one of the passed handles be set to signaled. */ | 1317 | /* or for one of the passed handles be set to signaled. */ |
1318 | if (tv == NULL) | 1318 | if (!tv) |
1319 | timeout = INFINITE; | 1319 | timeout = INFINITE; |
1320 | else | 1320 | else |
1321 | timeout = (DWORD)((tv->tv_sec * 1000.0) + (tv->tv_usec / 1000.0)); | 1321 | timeout = (DWORD)((tv->tv_sec * 1000.0) + (tv->tv_usec / 1000.0)); |
diff --git a/legacy/ecore/src/lib/ecore/ecore_pipe.c b/legacy/ecore/src/lib/ecore/ecore_pipe.c index 87f90382ab..9c26133efd 100644 --- a/legacy/ecore/src/lib/ecore/ecore_pipe.c +++ b/legacy/ecore/src/lib/ecore/ecore_pipe.c | |||
@@ -326,7 +326,7 @@ ecore_pipe_del(Ecore_Pipe *p) | |||
326 | ECORE_MAGIC_FAIL(p, ECORE_MAGIC_PIPE, "ecore_pipe_del"); | 326 | ECORE_MAGIC_FAIL(p, ECORE_MAGIC_PIPE, "ecore_pipe_del"); |
327 | return NULL; | 327 | return NULL; |
328 | } | 328 | } |
329 | if (p->fd_handler != NULL) ecore_main_fd_handler_del(p->fd_handler); | 329 | if (p->fd_handler) ecore_main_fd_handler_del(p->fd_handler); |
330 | if (p->fd_read != PIPE_FD_INVALID) pipe_close(p->fd_read); | 330 | if (p->fd_read != PIPE_FD_INVALID) pipe_close(p->fd_read); |
331 | if (p->fd_write != PIPE_FD_INVALID) pipe_close(p->fd_write); | 331 | if (p->fd_write != PIPE_FD_INVALID) pipe_close(p->fd_write); |
332 | data = (void *)p->data; | 332 | data = (void *)p->data; |
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c index 97b674337f..e25c712a51 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c | |||
@@ -1664,7 +1664,7 @@ _ecore_con_cl_udp_handler(void *data, Ecore_Fd_Handler *fd_handler) | |||
1664 | unsigned char *inbuf; | 1664 | unsigned char *inbuf; |
1665 | 1665 | ||
1666 | inbuf = malloc(num); | 1666 | inbuf = malloc(num); |
1667 | if(inbuf == NULL) | 1667 | if(!inbuf) |
1668 | return 1; | 1668 | return 1; |
1669 | 1669 | ||
1670 | memcpy(inbuf, buf, num); | 1670 | memcpy(inbuf, buf, num); |
@@ -1739,7 +1739,7 @@ _ecore_con_svr_udp_handler(void *data, Ecore_Fd_Handler *fd_handler) | |||
1739 | 1739 | ||
1740 | /* Create a new client for use in the client data event */ | 1740 | /* Create a new client for use in the client data event */ |
1741 | cl = calloc(1, sizeof(Ecore_Con_Client)); | 1741 | cl = calloc(1, sizeof(Ecore_Con_Client)); |
1742 | if(cl == NULL) | 1742 | if(!cl) |
1743 | return ECORE_CALLBACK_RENEW; | 1743 | return ECORE_CALLBACK_RENEW; |
1744 | 1744 | ||
1745 | cl->buf = NULL; | 1745 | cl->buf = NULL; |
@@ -1748,7 +1748,7 @@ _ecore_con_svr_udp_handler(void *data, Ecore_Fd_Handler *fd_handler) | |||
1748 | cl->server = svr; | 1748 | cl->server = svr; |
1749 | cl->client_addr = calloc(1, client_addr_len); | 1749 | cl->client_addr = calloc(1, client_addr_len); |
1750 | cl->client_addr_len = client_addr_len; | 1750 | cl->client_addr_len = client_addr_len; |
1751 | if(cl->client_addr == NULL) | 1751 | if(!cl->client_addr) |
1752 | { | 1752 | { |
1753 | free(cl); | 1753 | free(cl); |
1754 | return ECORE_CALLBACK_RENEW; | 1754 | return ECORE_CALLBACK_RENEW; |
@@ -1762,7 +1762,7 @@ _ecore_con_svr_udp_handler(void *data, Ecore_Fd_Handler *fd_handler) | |||
1762 | cl->client_addr_len); | 1762 | cl->client_addr_len); |
1763 | 1763 | ||
1764 | inbuf = malloc(num); | 1764 | inbuf = malloc(num); |
1765 | if(inbuf == NULL) | 1765 | if(!inbuf) |
1766 | { | 1766 | { |
1767 | free(cl->client_addr); | 1767 | free(cl->client_addr); |
1768 | free(cl); | 1768 | free(cl); |
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_ares.c b/legacy/ecore/src/lib/ecore_con/ecore_con_ares.c index 243c16fd45..b67606719f 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_ares.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_ares.c | |||
@@ -427,7 +427,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg, int status, int timeouts, | |||
427 | switch (status) | 427 | switch (status) |
428 | { | 428 | { |
429 | case ARES_SUCCESS: | 429 | case ARES_SUCCESS: |
430 | if (hostent->h_addr_list[0] == NULL) | 430 | if (!hostent->h_addr_list[0]) |
431 | { | 431 | { |
432 | fprintf(stderr, "No IP found\n"); | 432 | fprintf(stderr, "No IP found\n"); |
433 | goto on_error; | 433 | goto on_error; |
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c index 27b1b61574..09a0e8c4e5 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c | |||
@@ -736,7 +736,7 @@ ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, const char *username, | |||
736 | } | 736 | } |
737 | 737 | ||
738 | # if LIBCURL_VERSION_NUM >= 0x071301 | 738 | # if LIBCURL_VERSION_NUM >= 0x071301 |
739 | if ((username != NULL) && (password != NULL)) | 739 | if ((username) && (password)) |
740 | { | 740 | { |
741 | if (safe) | 741 | if (safe) |
742 | curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, | 742 | curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, |
@@ -1073,7 +1073,7 @@ _ecore_con_url_restart_fd_handler(void) | |||
1073 | 1073 | ||
1074 | EINA_LIST_FOREACH(_url_con_list, l, url_con) | 1074 | EINA_LIST_FOREACH(_url_con_list, l, url_con) |
1075 | { | 1075 | { |
1076 | if (url_con->fd_handler == NULL && url_con->fd != -1) | 1076 | if (!url_con->fd_handler && url_con->fd != -1) |
1077 | { | 1077 | { |
1078 | url_con->fd_handler = | 1078 | url_con->fd_handler = |
1079 | ecore_main_fd_handler_add(url_con->fd, url_con->flags, | 1079 | ecore_main_fd_handler_add(url_con->fd, url_con->flags, |
@@ -1345,7 +1345,7 @@ _ecore_con_url_fd_handler(void *data __UNUSED__, | |||
1345 | { | 1345 | { |
1346 | _ecore_con_url_suspend_fd_handler(); | 1346 | _ecore_con_url_suspend_fd_handler(); |
1347 | 1347 | ||
1348 | if (_fd_idler_handler == NULL) | 1348 | if (!_fd_idler_handler) |
1349 | _fd_idler_handler = ecore_idler_add( | 1349 | _fd_idler_handler = ecore_idler_add( |
1350 | _ecore_con_url_idler_handler, NULL); | 1350 | _ecore_con_url_idler_handler, NULL); |
1351 | 1351 | ||
@@ -1363,7 +1363,7 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match) | |||
1363 | int job_matched = 0; | 1363 | int job_matched = 0; |
1364 | 1364 | ||
1365 | /* Loop jobs and check if any are done */ | 1365 | /* Loop jobs and check if any are done */ |
1366 | while ((curlmsg = curl_multi_info_read(curlm, &n_remaining)) != NULL) | 1366 | while ((curlmsg = curl_multi_info_read(curlm, &n_remaining))) |
1367 | { | 1367 | { |
1368 | if (curlmsg->msg != CURLMSG_DONE) | 1368 | if (curlmsg->msg != CURLMSG_DONE) |
1369 | continue; | 1369 | continue; |
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c b/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c index 6a92dd8b49..6d47c8175b 100644 --- a/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c +++ b/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c | |||
@@ -423,7 +423,7 @@ ecore_config_theme_search_path_append(const char *path) | |||
423 | len = strlen(path); | 423 | len = strlen(path); |
424 | search_len = strlen(search_path); | 424 | search_len = strlen(search_path); |
425 | 425 | ||
426 | if (loc == NULL || (loc != search_path && *(loc - 1) != '|') || | 426 | if (!loc || (loc != search_path && *(loc - 1) != '|') || |
427 | (loc != (search_path + search_len - len) && *(loc + len - 1) != '|')) | 427 | (loc != (search_path + search_len - len) && *(loc + len - 1) != '|')) |
428 | { | 428 | { |
429 | new_search_path = malloc(search_len + len + 2); /* 2 = \0 + | */ | 429 | new_search_path = malloc(search_len + len + 2); /* 2 = \0 + | */ |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c index ab4d87be49..ca1fdf2337 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c | |||
@@ -731,7 +731,7 @@ ecore_evas_engines_get(void) | |||
731 | const struct ecore_evas_engine *itr; | 731 | const struct ecore_evas_engine *itr; |
732 | Eina_List *lst = NULL; | 732 | Eina_List *lst = NULL; |
733 | 733 | ||
734 | for (itr = _engines; itr->name != NULL; itr++) | 734 | for (itr = _engines; itr->name; itr++) |
735 | lst = eina_list_append(lst, itr->name); | 735 | lst = eina_list_append(lst, itr->name); |
736 | 736 | ||
737 | return lst; | 737 | return lst; |
@@ -753,7 +753,7 @@ _ecore_evas_new_auto_discover(int x, int y, int w, int h, const char *extra_opti | |||
753 | 753 | ||
754 | DBG("auto discover engine"); | 754 | DBG("auto discover engine"); |
755 | 755 | ||
756 | for (itr = _engines; itr->constructor != NULL; itr++) | 756 | for (itr = _engines; itr->constructor; itr++) |
757 | { | 757 | { |
758 | Ecore_Evas *ee = itr->constructor(x, y, w, h, extra_options); | 758 | Ecore_Evas *ee = itr->constructor(x, y, w, h, extra_options); |
759 | if (ee) | 759 | if (ee) |
@@ -801,7 +801,7 @@ ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char * | |||
801 | if (!engine_name) | 801 | if (!engine_name) |
802 | return _ecore_evas_new_auto_discover(x, y, w, h, extra_options); | 802 | return _ecore_evas_new_auto_discover(x, y, w, h, extra_options); |
803 | 803 | ||
804 | for (itr = _engines; itr->name != NULL; itr++) | 804 | for (itr = _engines; itr->name; itr++) |
805 | if (strcmp(itr->name, engine_name) == 0) | 805 | if (strcmp(itr->name, engine_name) == 0) |
806 | { | 806 | { |
807 | INF("using engine '%s', extra_options=%s", | 807 | INF("using engine '%s', extra_options=%s", |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c index 7ebdb4c74f..bdc7cd4bdb 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c | |||
@@ -263,7 +263,7 @@ _ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int h | |||
263 | 263 | ||
264 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); | 264 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); |
265 | 265 | ||
266 | if (obj == NULL) | 266 | if (!obj) |
267 | { | 267 | { |
268 | ee->prop.cursor.object = NULL; | 268 | ee->prop.cursor.object = NULL; |
269 | ee->prop.cursor.layer = 0; | 269 | ee->prop.cursor.layer = 0; |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c index 0b2a17418c..b3cf77ce83 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c | |||
@@ -352,7 +352,7 @@ _ecore_evas_directfb_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int lay | |||
352 | 352 | ||
353 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); | 353 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); |
354 | 354 | ||
355 | if (obj == NULL) | 355 | if (!obj) |
356 | { | 356 | { |
357 | ee->prop.cursor.object = NULL; | 357 | ee->prop.cursor.object = NULL; |
358 | ee->prop.cursor.layer = 0; | 358 | ee->prop.cursor.layer = 0; |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c index 7403c1297b..3f974d5b22 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c | |||
@@ -418,7 +418,7 @@ _ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int h | |||
418 | 418 | ||
419 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); | 419 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); |
420 | 420 | ||
421 | if (obj == NULL) | 421 | if (!obj) |
422 | { | 422 | { |
423 | ee->prop.cursor.object = NULL; | 423 | ee->prop.cursor.object = NULL; |
424 | ee->prop.cursor.layer = 0; | 424 | ee->prop.cursor.layer = 0; |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_sdl.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_sdl.c index e555011c1d..6a559270ba 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_sdl.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_sdl.c | |||
@@ -259,7 +259,7 @@ _ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int h | |||
259 | 259 | ||
260 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); | 260 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); |
261 | 261 | ||
262 | if (obj == NULL) | 262 | if (!obj) |
263 | { | 263 | { |
264 | ee->prop.cursor.object = NULL; | 264 | ee->prop.cursor.object = NULL; |
265 | ee->prop.cursor.layer = 0; | 265 | ee->prop.cursor.layer = 0; |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_win32.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_win32.c index 7c1f236539..e1d283b743 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_win32.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_win32.c | |||
@@ -773,7 +773,7 @@ _ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, int on) | |||
773 | Evas_Engine_Info_Software_DDraw *einfo; | 773 | Evas_Engine_Info_Software_DDraw *einfo; |
774 | 774 | ||
775 | einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ecore_evas_get(ee)); | 775 | einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ecore_evas_get(ee)); |
776 | if (einfo != NULL) | 776 | if (einfo) |
777 | { | 777 | { |
778 | einfo->info.fullscreen = !!on; | 778 | einfo->info.fullscreen = !!on; |
779 | /* einfo->info.layered = window->shape.layered; */ | 779 | /* einfo->info.layered = window->shape.layered; */ |
@@ -788,7 +788,7 @@ _ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, int on) | |||
788 | Evas_Engine_Info_Direct3D *einfo; | 788 | Evas_Engine_Info_Direct3D *einfo; |
789 | 789 | ||
790 | einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(ecore_evas_get(ee)); | 790 | einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(ecore_evas_get(ee)); |
791 | if (einfo != NULL) | 791 | if (einfo) |
792 | { | 792 | { |
793 | einfo->info.fullscreen = !!on; | 793 | einfo->info.fullscreen = !!on; |
794 | einfo->info.layered = window->shape.layered; | 794 | einfo->info.layered = window->shape.layered; |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c index f1cbdca5bd..1c3cbb4dcb 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c | |||
@@ -661,7 +661,7 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on) | |||
661 | } | 661 | } |
662 | 662 | ||
663 | einfo = (Evas_Engine_Info_Software_16_WinCE *)evas_engine_info_get(ecore_evas_get(ee)); | 663 | einfo = (Evas_Engine_Info_Software_16_WinCE *)evas_engine_info_get(ecore_evas_get(ee)); |
664 | if (einfo != NULL) | 664 | if (einfo) |
665 | { | 665 | { |
666 | einfo->info.fullscreen = !!on; | 666 | einfo->info.fullscreen = !!on; |
667 | /* einfo->info.layered = window->shape.layered; */ | 667 | /* einfo->info.layered = window->shape.layered; */ |
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c index 09a636f380..e863b64ead 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c | |||
@@ -2378,7 +2378,7 @@ _ecore_evas_x_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int | |||
2378 | 2378 | ||
2379 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); | 2379 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); |
2380 | 2380 | ||
2381 | if (obj == NULL) | 2381 | if (!obj) |
2382 | { | 2382 | { |
2383 | ee->prop.cursor.object = NULL; | 2383 | ee->prop.cursor.object = NULL; |
2384 | ee->prop.cursor.layer = 0; | 2384 | ee->prop.cursor.layer = 0; |
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c index c106ecc967..c1e1f08076 100644 --- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c +++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ts.c | |||
@@ -80,7 +80,7 @@ ecore_fb_ts_init(void) | |||
80 | { | 80 | { |
81 | #ifdef HAVE_TSLIB | 81 | #ifdef HAVE_TSLIB |
82 | char *tslib_tsdevice = NULL; | 82 | char *tslib_tsdevice = NULL; |
83 | if ( ( tslib_tsdevice = getenv("TSLIB_TSDEVICE") ) != NULL ) | 83 | if ( (tslib_tsdevice = getenv("TSLIB_TSDEVICE")) ) |
84 | { | 84 | { |
85 | printf( "ECORE_FB: TSLIB_TSDEVICE = '%s'\n", tslib_tsdevice ); | 85 | printf( "ECORE_FB: TSLIB_TSDEVICE = '%s'\n", tslib_tsdevice ); |
86 | _ecore_fb_tslib_tsdev = ts_open( tslib_tsdevice, 1 ); /* 1 = nonblocking, 0 = blocking */ | 86 | _ecore_fb_tslib_tsdev = ts_open( tslib_tsdevice, 1 ); /* 1 = nonblocking, 0 = blocking */ |
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c index 32298965e6..ec0a1f72ba 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c | |||
@@ -177,7 +177,7 @@ ecore_file_mkdirs(const char **dirs) | |||
177 | 177 | ||
178 | if (!dirs) return -1; | 178 | if (!dirs) return -1; |
179 | 179 | ||
180 | for (; *dirs != NULL; dirs++) | 180 | for (; *dirs; dirs++) |
181 | if (ecore_file_mkdir(*dirs)) | 181 | if (ecore_file_mkdir(*dirs)) |
182 | i++; | 182 | i++; |
183 | return i; | 183 | return i; |
@@ -234,7 +234,7 @@ ecore_file_mksubdirs(const char *base, const char **subdirs) | |||
234 | #endif | 234 | #endif |
235 | 235 | ||
236 | i = 0; | 236 | i = 0; |
237 | for (; *subdirs != NULL; subdirs++) | 237 | for (; *subdirs; subdirs++) |
238 | { | 238 | { |
239 | struct stat st; | 239 | struct stat st; |
240 | 240 | ||
@@ -420,7 +420,7 @@ ecore_file_mkpaths(const char **paths) | |||
420 | 420 | ||
421 | if (!paths) return -1; | 421 | if (!paths) return -1; |
422 | 422 | ||
423 | for (; *paths != NULL; paths++) | 423 | for (; *paths; paths++) |
424 | if (ecore_file_mkpath(*paths)) | 424 | if (ecore_file_mkpath(*paths)) |
425 | i++; | 425 | i++; |
426 | return i; | 426 | return i; |
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c index fd8f2e9d4e..c25b6d581f 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c | |||
@@ -147,7 +147,7 @@ ecore_file_download(const char *url, const char *dst, | |||
147 | 147 | ||
148 | job = _ecore_file_download_curl(url, dst, completion_cb, progress_cb, data); | 148 | job = _ecore_file_download_curl(url, dst, completion_cb, progress_cb, data); |
149 | if(job_ret) *job_ret = job; | 149 | if(job_ret) *job_ret = job; |
150 | return job != NULL; | 150 | return !!job; |
151 | } | 151 | } |
152 | # endif | 152 | # endif |
153 | else | 153 | else |
diff --git a/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c b/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c index c8d386844b..415f812535 100755 --- a/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c +++ b/legacy/ecore/src/lib/ecore_win32/ecore_win32_dnd.c | |||
@@ -57,7 +57,7 @@ int ecore_win32_dnd_begin(const char *data, | |||
57 | STGMEDIUM stgmed = { TYMED_HGLOBAL, { 0 }, 0 }; | 57 | STGMEDIUM stgmed = { TYMED_HGLOBAL, { 0 }, 0 }; |
58 | int res = 0; | 58 | int res = 0; |
59 | 59 | ||
60 | if (data == NULL) | 60 | if (!data) |
61 | return 0; | 61 | return 0; |
62 | if (size < 0) | 62 | if (size < 0) |
63 | size = strlen(data) + 1; | 63 | size = strlen(data) + 1; |
@@ -108,22 +108,22 @@ int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *win | |||
108 | { | 108 | { |
109 | struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; | 109 | struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; |
110 | 110 | ||
111 | if (window == NULL) | 111 | if (!window) |
112 | return 0; | 112 | return 0; |
113 | 113 | ||
114 | wnd->dnd_drop_target = _ecore_win32_dnd_register_drop_window(wnd->window, | 114 | wnd->dnd_drop_target = _ecore_win32_dnd_register_drop_window(wnd->window, |
115 | callback, | 115 | callback, |
116 | (void *)wnd); | 116 | (void *)wnd); |
117 | return (int)(wnd->dnd_drop_target != NULL); | 117 | return (int)(!!wnd->dnd_drop_target); |
118 | } | 118 | } |
119 | 119 | ||
120 | void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window) | 120 | void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window) |
121 | { | 121 | { |
122 | struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; | 122 | struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window; |
123 | 123 | ||
124 | if (window == NULL) | 124 | if (!window) |
125 | return; | 125 | return; |
126 | 126 | ||
127 | if (wnd->dnd_drop_target != NULL) | 127 | if (wnd->dnd_drop_target) |
128 | _ecore_win32_dnd_unregister_drop_window(wnd->window, wnd->dnd_drop_target); | 128 | _ecore_win32_dnd_unregister_drop_window(wnd->window, wnd->dnd_drop_target); |
129 | } | 129 | } |
diff --git a/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c b/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c index d110b0bfca..102ea69f8f 100644 --- a/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c +++ b/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c | |||
@@ -79,7 +79,7 @@ ecore_win32_window_free(Ecore_Win32_Window *window) | |||
79 | 79 | ||
80 | INF("destroying window"); | 80 | INF("destroying window"); |
81 | 81 | ||
82 | if (wnd->shape.mask != NULL) | 82 | if (wnd->shape.mask) |
83 | free(wnd->shape.mask); | 83 | free(wnd->shape.mask); |
84 | 84 | ||
85 | DestroyWindow(((struct _Ecore_Win32_Window *)window)->window); | 85 | DestroyWindow(((struct _Ecore_Win32_Window *)window)->window); |
@@ -473,12 +473,12 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window, | |||
473 | int y; | 473 | int y; |
474 | OSVERSIONINFO version_info; | 474 | OSVERSIONINFO version_info; |
475 | 475 | ||
476 | if (window == NULL) | 476 | if (!window) |
477 | return; | 477 | return; |
478 | 478 | ||
479 | wnd = (struct _Ecore_Win32_Window *)window; | 479 | wnd = (struct _Ecore_Win32_Window *)window; |
480 | 480 | ||
481 | if (mask == NULL) | 481 | if (!mask) |
482 | { | 482 | { |
483 | wnd->shape.enabled = 0; | 483 | wnd->shape.enabled = 0; |
484 | if (wnd->shape.layered != 0) | 484 | if (wnd->shape.layered != 0) |
@@ -518,7 +518,7 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window, | |||
518 | { | 518 | { |
519 | wnd->shape.width = width; | 519 | wnd->shape.width = width; |
520 | wnd->shape.height = height; | 520 | wnd->shape.height = height; |
521 | if (wnd->shape.mask != NULL) | 521 | if (wnd->shape.mask) |
522 | { | 522 | { |
523 | free(wnd->shape.mask); | 523 | free(wnd->shape.mask); |
524 | wnd->shape.mask = NULL; | 524 | wnd->shape.mask = NULL; |
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c index aa1dc1602f..8bd53bad62 100644 --- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c +++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c | |||
@@ -591,7 +591,7 @@ ecore_x_init(const char *name) | |||
591 | int i; | 591 | int i; |
592 | 592 | ||
593 | XSetLocaleModifiers("@im=none"); | 593 | XSetLocaleModifiers("@im=none"); |
594 | if ((im = XOpenIM(_ecore_x_disp, NULL, NULL, NULL)) == NULL) | 594 | if (!(im = XOpenIM(_ecore_x_disp, NULL, NULL, NULL))) |
595 | goto _im_create_end; | 595 | goto _im_create_end; |
596 | 596 | ||
597 | ret = XGetIMValues(im, XNQueryInputStyle, &supported_styles, NULL); | 597 | ret = XGetIMValues(im, XNQueryInputStyle, &supported_styles, NULL); |
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_image.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_image.c index 4b8215cc2f..f0d62866d5 100644 --- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_image.c +++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_image.c | |||
@@ -167,7 +167,7 @@ _ecore_x_image_shm_create(Ecore_X_Image *im) | |||
167 | im->shminfo.shmaddr = shmat(im->shminfo.shmid, 0, 0); | 167 | im->shminfo.shmaddr = shmat(im->shminfo.shmid, 0, 0); |
168 | im->xim->data = im->shminfo.shmaddr; | 168 | im->xim->data = im->shminfo.shmaddr; |
169 | if ((im->xim->data == (char *)-1) || | 169 | if ((im->xim->data == (char *)-1) || |
170 | (im->xim->data == NULL)) | 170 | (!im->xim->data)) |
171 | { | 171 | { |
172 | shmdt(im->shminfo.shmaddr); | 172 | shmdt(im->shminfo.shmaddr); |
173 | shmctl(im->shminfo.shmid, IPC_RMID, 0); | 173 | shmctl(im->shminfo.shmid, IPC_RMID, 0); |
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c index a8062cbe03..7e31730ea7 100644 --- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c +++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c | |||
@@ -1701,7 +1701,7 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, | |||
1701 | Eina_Bool ret; | 1701 | Eina_Bool ret; |
1702 | 1702 | ||
1703 | 1703 | ||
1704 | if ((nnot_moved <= 0) || (not_moved == NULL) | 1704 | if ((nnot_moved <= 0) || (!not_moved) |
1705 | || !_ecore_x_randr_root_validate(root) | 1705 | || !_ecore_x_randr_root_validate(root) |
1706 | || !(res = | 1706 | || !(res = |
1707 | _ecore_x_randr_get_screen_resources (_ecore_x_disp, root))) | 1707 | _ecore_x_randr_get_screen_resources (_ecore_x_disp, root))) |
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_window.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_window.c index ab652d5f38..162856480c 100644 --- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_window.c +++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_window.c | |||
@@ -1438,7 +1438,7 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent, | |||
1438 | VisualClassMask, | 1438 | VisualClassMask, |
1439 | &vi_in, | 1439 | &vi_in, |
1440 | &nvi); | 1440 | &nvi); |
1441 | if (xvi == NULL) | 1441 | if (!xvi) |
1442 | return 0; | 1442 | return 0; |
1443 | 1443 | ||
1444 | vis = NULL; | 1444 | vis = NULL; |
diff --git a/legacy/ecore/src/tests/ecore_suite.c b/legacy/ecore/src/tests/ecore_suite.c index 9c7e199d19..8f5ad266aa 100644 --- a/legacy/ecore/src/tests/ecore_suite.c +++ b/legacy/ecore/src/tests/ecore_suite.c | |||
@@ -30,7 +30,7 @@ _list_tests(void) | |||
30 | 30 | ||
31 | itr = etc; | 31 | itr = etc; |
32 | fputs("Available Test Cases:\n", stderr); | 32 | fputs("Available Test Cases:\n", stderr); |
33 | for (; itr->test_case != NULL; itr++) | 33 | for (; itr->test_case; itr++) |
34 | fprintf(stderr, "\t%s\n", itr->test_case); | 34 | fprintf(stderr, "\t%s\n", itr->test_case); |
35 | } | 35 | } |
36 | static Eina_Bool | 36 | static Eina_Bool |
@@ -54,7 +54,7 @@ ecore_suite_build(int argc, const char **argv) | |||
54 | 54 | ||
55 | s = suite_create("Ecore"); | 55 | s = suite_create("Ecore"); |
56 | 56 | ||
57 | for (i = 0; etc[i].test_case != NULL; ++i) | 57 | for (i = 0; etc[i].test_case; ++i) |
58 | { | 58 | { |
59 | if (!_use_test(argc, argv, etc[i].test_case)) continue; | 59 | if (!_use_test(argc, argv, etc[i].test_case)) continue; |
60 | tc = tcase_create(etc[i].test_case); | 60 | tc = tcase_create(etc[i].test_case); |
diff --git a/legacy/ecore/src/tests/ecore_test_ecore.c b/legacy/ecore/src/tests/ecore_test_ecore.c index 6f7e30e0ed..cb6212fb84 100644 --- a/legacy/ecore/src/tests/ecore_test_ecore.c +++ b/legacy/ecore/src/tests/ecore_test_ecore.c | |||
@@ -49,7 +49,7 @@ START_TEST(ecore_test_ecore_main_loop) | |||
49 | fail_if(ret != 1); | 49 | fail_if(ret != 1); |
50 | 50 | ||
51 | timer = ecore_timer_add(0.0, _quit_cb, &did); | 51 | timer = ecore_timer_add(0.0, _quit_cb, &did); |
52 | fail_if(timer == NULL); | 52 | fail_if(!timer); |
53 | 53 | ||
54 | ecore_main_loop_begin(); | 54 | ecore_main_loop_begin(); |
55 | 55 | ||
@@ -70,7 +70,7 @@ START_TEST(ecore_test_ecore_main_loop_idler) | |||
70 | fail_if(ret != 1); | 70 | fail_if(ret != 1); |
71 | 71 | ||
72 | idler = ecore_idler_add(_quit_cb, &did); | 72 | idler = ecore_idler_add(_quit_cb, &did); |
73 | fail_if(idler == NULL); | 73 | fail_if(!idler); |
74 | 74 | ||
75 | ecore_main_loop_begin(); | 75 | ecore_main_loop_begin(); |
76 | 76 | ||
@@ -91,7 +91,7 @@ START_TEST(ecore_test_ecore_main_loop_idle_enterer) | |||
91 | fail_if(ret != 1); | 91 | fail_if(ret != 1); |
92 | 92 | ||
93 | idle_enterer = ecore_idle_enterer_add(_quit_cb, &did); | 93 | idle_enterer = ecore_idle_enterer_add(_quit_cb, &did); |
94 | fail_if(idle_enterer == NULL); | 94 | fail_if(!idle_enterer); |
95 | 95 | ||
96 | ecore_main_loop_begin(); | 96 | ecore_main_loop_begin(); |
97 | 97 | ||
@@ -114,10 +114,10 @@ START_TEST(ecore_test_ecore_main_loop_idle_exiter) | |||
114 | 114 | ||
115 | /* make system exit idle */ | 115 | /* make system exit idle */ |
116 | timer = ecore_timer_add(0.0, _dummy_cb, (void *)(long)0); | 116 | timer = ecore_timer_add(0.0, _dummy_cb, (void *)(long)0); |
117 | fail_if(timer == NULL); | 117 | fail_if(!timer); |
118 | 118 | ||
119 | idle_exiter = ecore_idle_exiter_add(_quit_cb, &did); | 119 | idle_exiter = ecore_idle_exiter_add(_quit_cb, &did); |
120 | fail_if(idle_exiter == NULL); | 120 | fail_if(!idle_exiter); |
121 | 121 | ||
122 | ecore_main_loop_begin(); | 122 | ecore_main_loop_begin(); |
123 | 123 | ||
@@ -139,7 +139,7 @@ START_TEST(ecore_test_ecore_main_loop_timer) | |||
139 | fail_if(ret != 1); | 139 | fail_if(ret != 1); |
140 | 140 | ||
141 | timer = ecore_timer_add(2.0, _quit_cb, &did); | 141 | timer = ecore_timer_add(2.0, _quit_cb, &did); |
142 | fail_if(timer == NULL); | 142 | fail_if(!timer); |
143 | 143 | ||
144 | start = ecore_time_get(); | 144 | start = ecore_time_get(); |
145 | ecore_main_loop_begin(); | 145 | ecore_main_loop_begin(); |
diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c index 79749a7d4c..b309a6e746 100644 --- a/legacy/edje/src/bin/edje_cc_handlers.c +++ b/legacy/edje/src/bin/edje_cc_handlers.c | |||
@@ -1734,7 +1734,7 @@ ob_collections_group(void) | |||
1734 | Edje_Part_Collection *pc; | 1734 | Edje_Part_Collection *pc; |
1735 | Code *cd; | 1735 | Code *cd; |
1736 | 1736 | ||
1737 | if (current_de != NULL && current_de->entry == NULL) | 1737 | if (current_de && !current_de->entry) |
1738 | { | 1738 | { |
1739 | ERR("%p: Error. A collection without a name was detected, that's not allowed.", progname); | 1739 | ERR("%p: Error. A collection without a name was detected, that's not allowed.", progname); |
1740 | exit(-1); | 1740 | exit(-1); |
diff --git a/legacy/edje/src/bin/edje_cc_parse.c b/legacy/edje/src/bin/edje_cc_parse.c index effe5f3115..1c63b5f992 100644 --- a/legacy/edje/src/bin/edje_cc_parse.c +++ b/legacy/edje/src/bin/edje_cc_parse.c | |||
@@ -445,7 +445,7 @@ parse(char *data, off_t size) | |||
445 | p = data; | 445 | p = data; |
446 | end = data + size; | 446 | end = data + size; |
447 | line = 1; | 447 | line = 1; |
448 | while ((token = next_token(p, end, &p, &delim)) != NULL) | 448 | while ((token = next_token(p, end, &p, &delim))) |
449 | { | 449 | { |
450 | /* if we are in param mode, the only delimiter | 450 | /* if we are in param mode, the only delimiter |
451 | * we'll accept is the semicolon | 451 | * we'll accept is the semicolon |
diff --git a/legacy/edje/src/bin/edje_convert.c b/legacy/edje/src/bin/edje_convert.c index 7e9a73e988..5b05da93a9 100644 --- a/legacy/edje/src/bin/edje_convert.c +++ b/legacy/edje/src/bin/edje_convert.c | |||
@@ -269,8 +269,8 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce, | |||
269 | _edje_collection_program_add(&edc->programs.nocmp, | 269 | _edje_collection_program_add(&edc->programs.nocmp, |
270 | &edc->programs.nocmp_count, | 270 | &edc->programs.nocmp_count, |
271 | pg); | 271 | pg); |
272 | else if (pg->signal && strpbrk(pg->signal, "*?[\\") == NULL | 272 | else if (pg->signal && !strpbrk(pg->signal, "*?[\\") |
273 | && pg->source && strpbrk(pg->source, "*?[\\") == NULL) | 273 | && pg->source && !strpbrk(pg->source, "*?[\\")) |
274 | _edje_collection_program_add(&edc->programs.strcmp, | 274 | _edje_collection_program_add(&edc->programs.strcmp, |
275 | &edc->programs.strcmp_count, | 275 | &edc->programs.strcmp_count, |
276 | pg); | 276 | pg); |
diff --git a/legacy/edje/src/bin/edje_convert_main.c b/legacy/edje/src/bin/edje_convert_main.c index 5ab5ef98c0..b241d770d6 100644 --- a/legacy/edje/src/bin/edje_convert_main.c +++ b/legacy/edje/src/bin/edje_convert_main.c | |||
@@ -57,7 +57,7 @@ _edje_alias_int(const char *target, Eet_File *ef, const char *base, const char * | |||
57 | 57 | ||
58 | snprintf(buf, sizeof (buf), "%s/", base); | 58 | snprintf(buf, sizeof (buf), "%s/", base); |
59 | strcat(buf, "%i"); | 59 | strcat(buf, "%i"); |
60 | for (i = 0; i < count && match != NULL; ++i) | 60 | for (i = 0; i < count && match; ++i) |
61 | { | 61 | { |
62 | char name[1024]; | 62 | char name[1024]; |
63 | int id; | 63 | int id; |
@@ -87,7 +87,7 @@ _edje_alias_string(const char *target, Eet_File *ef, const char *base, const cha | |||
87 | 87 | ||
88 | snprintf(buf, sizeof (buf), "%s/", base); | 88 | snprintf(buf, sizeof (buf), "%s/", base); |
89 | strcat(buf, "%s"); | 89 | strcat(buf, "%s"); |
90 | for (i = 0; i < count && match != NULL; ++i) | 90 | for (i = 0; i < count && match; ++i) |
91 | { | 91 | { |
92 | char name[1024]; | 92 | char name[1024]; |
93 | char id[1024]; | 93 | char id[1024]; |
diff --git a/legacy/edje/src/bin/edje_player.c b/legacy/edje/src/bin/edje_player.c index bc65d7ff90..2c8d54b352 100644 --- a/legacy/edje/src/bin/edje_player.c +++ b/legacy/edje/src/bin/edje_player.c | |||
@@ -226,7 +226,7 @@ _slave_mode(void *data, Ecore_Fd_Handler *fd_handler) | |||
226 | } | 226 | } |
227 | } | 227 | } |
228 | 228 | ||
229 | for (itr = _slave_mode_commands; itr->cmd != NULL; itr++) | 229 | for (itr = _slave_mode_commands; itr->cmd; itr++) |
230 | { | 230 | { |
231 | if (strcmp(itr->cmd, buf) == 0) | 231 | if (strcmp(itr->cmd, buf) == 0) |
232 | { | 232 | { |
diff --git a/legacy/edje/src/lib/edje_calc.c b/legacy/edje/src/lib/edje_calc.c index 2cc3f8cf1a..b339edb37f 100644 --- a/legacy/edje/src/lib/edje_calc.c +++ b/legacy/edje/src/lib/edje_calc.c | |||
@@ -125,7 +125,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl | |||
125 | epdi = (Edje_Part_Description_Image*) epd2; | 125 | epdi = (Edje_Part_Description_Image*) epd2; |
126 | 126 | ||
127 | /* There is an animation if both description are different or if description is an image with tweens */ | 127 | /* There is an animation if both description are different or if description is an image with tweens */ |
128 | if (epd2 != NULL && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tweens_count))) | 128 | if (epd2 && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tweens_count))) |
129 | { | 129 | { |
130 | if (!ep->param2) | 130 | if (!ep->param2) |
131 | { | 131 | { |
diff --git a/legacy/edje/src/lib/edje_convert.c b/legacy/edje/src/lib/edje_convert.c index 58dccc2033..6b183fd466 100644 --- a/legacy/edje/src/lib/edje_convert.c +++ b/legacy/edje/src/lib/edje_convert.c | |||
@@ -321,8 +321,8 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc) | |||
321 | _edje_collection_program_add(&edc->programs.nocmp, | 321 | _edje_collection_program_add(&edc->programs.nocmp, |
322 | &edc->programs.nocmp_count, | 322 | &edc->programs.nocmp_count, |
323 | pg); | 323 | pg); |
324 | else if (pg->signal && strpbrk(pg->signal, "*?[\\") == NULL | 324 | else if (pg->signal && !strpbrk(pg->signal, "*?[\\") |
325 | && pg->source && strpbrk(pg->source, "*?[\\") == NULL) | 325 | && pg->source && !strpbrk(pg->source, "*?[\\")) |
326 | _edje_collection_program_add(&edc->programs.strcmp, | 326 | _edje_collection_program_add(&edc->programs.strcmp, |
327 | &edc->programs.strcmp_count, | 327 | &edc->programs.strcmp_count, |
328 | pg); | 328 | pg); |
diff --git a/legacy/edje/src/lib/edje_embryo.c b/legacy/edje/src/lib/edje_embryo.c index 96e9cb8b64..bcaa25aaf8 100644 --- a/legacy/edje/src/lib/edje_embryo.c +++ b/legacy/edje/src/lib/edje_embryo.c | |||
@@ -1152,7 +1152,7 @@ _edje_embryo_fn_get_color_class(Embryo_Program *ep, Embryo_Cell *params) | |||
1152 | GETSTR(class, params[1]); | 1152 | GETSTR(class, params[1]); |
1153 | if (!class) return 0; | 1153 | if (!class) return 0; |
1154 | c_class = _edje_color_class_find(ed, class); | 1154 | c_class = _edje_color_class_find(ed, class); |
1155 | if (c_class == NULL) return 0; | 1155 | if (!c_class) return 0; |
1156 | SETINT(c_class->r, params[2]); | 1156 | SETINT(c_class->r, params[2]); |
1157 | SETINT(c_class->g, params[3]); | 1157 | SETINT(c_class->g, params[3]); |
1158 | SETINT(c_class->b, params[4]); | 1158 | SETINT(c_class->b, params[4]); |
@@ -1208,7 +1208,7 @@ _edje_embryo_fn_get_text_class(Embryo_Program *ep, Embryo_Cell *params) | |||
1208 | GETSTR(class, params[1]); | 1208 | GETSTR(class, params[1]); |
1209 | if (!class) return 0; | 1209 | if (!class) return 0; |
1210 | t_class = _edje_text_class_find(ed, class); | 1210 | t_class = _edje_text_class_find(ed, class); |
1211 | if (t_class == NULL) return 0; | 1211 | if (!t_class) return 0; |
1212 | SETSTR((char *)t_class->font, params[2]); | 1212 | SETSTR((char *)t_class->font, params[2]); |
1213 | SETFLOAT(t_class->size, params[3]); | 1213 | SETFLOAT(t_class->size, params[3]); |
1214 | return 0; | 1214 | return 0; |
diff --git a/legacy/edje/src/lib/edje_entry.c b/legacy/edje/src/lib/edje_entry.c index 16ae0ec071..438ee5f31e 100644 --- a/legacy/edje/src/lib/edje_entry.c +++ b/legacy/edje/src/lib/edje_entry.c | |||
@@ -130,7 +130,7 @@ _edje_focus_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
130 | _edje_emit(ed, "focus,in", ""); | 130 | _edje_emit(ed, "focus,in", ""); |
131 | #ifdef HAVE_ECORE_IMF | 131 | #ifdef HAVE_ECORE_IMF |
132 | rp = ed->focused_part; | 132 | rp = ed->focused_part; |
133 | if (rp == NULL) return; | 133 | if (!rp) return; |
134 | 134 | ||
135 | en = rp->entry_data; | 135 | en = rp->entry_data; |
136 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || | 136 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || |
diff --git a/legacy/edje/src/lib/edje_external.c b/legacy/edje/src/lib/edje_external.c index bf60d24212..b25e21e9f3 100644 --- a/legacy/edje/src/lib/edje_external.c +++ b/legacy/edje/src/lib/edje_external.c | |||
@@ -239,7 +239,7 @@ edje_object_part_external_param_type_get(const Evas_Object *obj, const char *par | |||
239 | type->module_name); | 239 | type->module_name); |
240 | return EDJE_EXTERNAL_PARAM_TYPE_MAX; | 240 | return EDJE_EXTERNAL_PARAM_TYPE_MAX; |
241 | } | 241 | } |
242 | for (info = type->parameters_info; info->name != NULL; info++) | 242 | for (info = type->parameters_info; info->name; info++) |
243 | if (strcmp(info->name, param) == 0) | 243 | if (strcmp(info->name, param) == 0) |
244 | return info->type; | 244 | return info->type; |
245 | 245 | ||
diff --git a/legacy/edje/src/lib/edje_load.c b/legacy/edje/src/lib/edje_load.c index 4d2acfd63b..f07578b25d 100644 --- a/legacy/edje/src/lib/edje_load.c +++ b/legacy/edje/src/lib/edje_load.c | |||
@@ -139,7 +139,7 @@ edje_file_collection_list(const char *file) | |||
139 | 139 | ||
140 | if ((!file) || (!*file)) return NULL; | 140 | if ((!file) || (!*file)) return NULL; |
141 | edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL); | 141 | edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL); |
142 | if (edf != NULL) | 142 | if (edf) |
143 | { | 143 | { |
144 | Eina_Iterator *i; | 144 | Eina_Iterator *i; |
145 | const char *key; | 145 | const char *key; |
@@ -186,7 +186,7 @@ edje_file_group_exists(const char *file, const char *glob) | |||
186 | 186 | ||
187 | if ((!file) || (!*file)) return EINA_FALSE; | 187 | if ((!file) || (!*file)) return EINA_FALSE; |
188 | edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL); | 188 | edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL); |
189 | if (edf != NULL) | 189 | if (edf) |
190 | { | 190 | { |
191 | Edje_Patterns *patterns; | 191 | Edje_Patterns *patterns; |
192 | 192 | ||
@@ -246,7 +246,7 @@ edje_file_data_get(const char *file, const char *key) | |||
246 | if (key) | 246 | if (key) |
247 | { | 247 | { |
248 | edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL); | 248 | edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL); |
249 | if (edf != NULL) | 249 | if (edf) |
250 | { | 250 | { |
251 | str = (char*) edje_string_get(eina_hash_find(edf->data, key)); | 251 | str = (char*) edje_string_get(eina_hash_find(edf->data, key)); |
252 | 252 | ||
@@ -883,7 +883,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
883 | void | 883 | void |
884 | _edje_file_add(Edje *ed) | 884 | _edje_file_add(Edje *ed) |
885 | { | 885 | { |
886 | if (_edje_edd_edje_file == NULL) return; | 886 | if (!_edje_edd_edje_file) return; |
887 | ed->file = _edje_cache_file_coll_open(ed->path, ed->group, | 887 | ed->file = _edje_cache_file_coll_open(ed->path, ed->group, |
888 | &(ed->load_error), | 888 | &(ed->load_error), |
889 | &(ed->collection)); | 889 | &(ed->collection)); |
diff --git a/legacy/edje/src/lib/edje_lua.c b/legacy/edje/src/lib/edje_lua.c index b01d0adc6e..c29e83902c 100644 --- a/legacy/edje/src/lib/edje_lua.c +++ b/legacy/edje/src/lib/edje_lua.c | |||
@@ -385,7 +385,7 @@ _edje_lua_new_class(lua_State *L, const Edje_Lua_Reg ** class) | |||
385 | { | 385 | { |
386 | int n = 0; | 386 | int n = 0; |
387 | _edje_lua_new_metatable(L, class); | 387 | _edje_lua_new_metatable(L, class); |
388 | while (class && (class[n] != NULL)) | 388 | while (class && (class[n])) |
389 | { | 389 | { |
390 | luaL_register(L, NULL, class[n]->mt); | 390 | luaL_register(L, NULL, class[n]->mt); |
391 | lua_pushstring(L, "hands off, it's none of your business!"); | 391 | lua_pushstring(L, "hands off, it's none of your business!"); |
@@ -5075,7 +5075,7 @@ _edje_lua_alloc(void *ud, void *ptr, size_t osize, size_t nsize) | |||
5075 | void | 5075 | void |
5076 | _edje_lua_init() | 5076 | _edje_lua_init() |
5077 | { | 5077 | { |
5078 | if (Ledje != NULL) return; | 5078 | if (Ledje) return; |
5079 | /* | 5079 | /* |
5080 | * create main Lua state with the custom memory allocation function | 5080 | * create main Lua state with the custom memory allocation function |
5081 | */ | 5081 | */ |
@@ -5161,7 +5161,7 @@ _edje_lua_init() | |||
5161 | void | 5161 | void |
5162 | _edje_lua_shutdown() | 5162 | _edje_lua_shutdown() |
5163 | { | 5163 | { |
5164 | if (Ledje == NULL) return; | 5164 | if (!Ledje) return; |
5165 | lua_close(Ledje); | 5165 | lua_close(Ledje); |
5166 | Ledje = NULL; | 5166 | Ledje = NULL; |
5167 | } | 5167 | } |
diff --git a/legacy/edje/src/lib/edje_match.c b/legacy/edje/src/lib/edje_match.c index 85aa3b123d..b9ff606103 100644 --- a/legacy/edje/src/lib/edje_match.c +++ b/legacy/edje/src/lib/edje_match.c | |||
@@ -673,8 +673,8 @@ edje_match_program_hash_build(Edje_Program * const *programs, | |||
673 | 673 | ||
674 | for (i = 0; i < count; ++i) | 674 | for (i = 0; i < count; ++i) |
675 | { | 675 | { |
676 | if (programs[i]->signal && strpbrk(programs[i]->signal, "*?[\\") == NULL | 676 | if (programs[i]->signal && !strpbrk(programs[i]->signal, "*?[\\") |
677 | && programs[i]->source && strpbrk(programs[i]->source, "*?[\\") == NULL) | 677 | && programs[i]->source && !strpbrk(programs[i]->source, "*?[\\")) |
678 | { | 678 | { |
679 | Edje_Signal_Source_Char *item; | 679 | Edje_Signal_Source_Char *item; |
680 | 680 | ||
@@ -714,8 +714,8 @@ edje_match_callback_hash_build(const Eina_List *callbacks, | |||
714 | 714 | ||
715 | EINA_LIST_FOREACH(callbacks, l, callback) | 715 | EINA_LIST_FOREACH(callbacks, l, callback) |
716 | { | 716 | { |
717 | if (callback->signal && strpbrk(callback->signal, "*?[\\") == NULL | 717 | if (callback->signal && !strpbrk(callback->signal, "*?[\\") |
718 | && callback->source && strpbrk(callback->source, "*?[\\") == NULL) | 718 | && callback->source && !strpbrk(callback->source, "*?[\\")) |
719 | { | 719 | { |
720 | Edje_Signal_Source_Char *item; | 720 | Edje_Signal_Source_Char *item; |
721 | 721 | ||
diff --git a/legacy/edje/src/lib/edje_message_queue.c b/legacy/edje/src/lib/edje_message_queue.c index 25b0dcb0e3..3ffb137c93 100644 --- a/legacy/edje/src/lib/edje_message_queue.c +++ b/legacy/edje/src/lib/edje_message_queue.c | |||
@@ -691,7 +691,7 @@ _edje_message_queue_process(void) | |||
691 | { | 691 | { |
692 | int i; | 692 | int i; |
693 | 693 | ||
694 | if (msgq == NULL) return; | 694 | if (!msgq) return; |
695 | 695 | ||
696 | /* allow the message queue to feed itself up to 8 times before forcing */ | 696 | /* allow the message queue to feed itself up to 8 times before forcing */ |
697 | /* us to go back to normal processing and let a 0 timeout deal with it */ | 697 | /* us to go back to normal processing and let a 0 timeout deal with it */ |
diff --git a/legacy/edje/src/lib/edje_private.h b/legacy/edje/src/lib/edje_private.h index 15eda5472f..d962bd412d 100644 --- a/legacy/edje/src/lib/edje_private.h +++ b/legacy/edje/src/lib/edje_private.h | |||
@@ -1749,7 +1749,7 @@ edje_program_is_strrncmp(const char *str) | |||
1749 | { | 1749 | { |
1750 | if (*str != '*' && *str != '?') | 1750 | if (*str != '*' && *str != '?') |
1751 | return EINA_FALSE; | 1751 | return EINA_FALSE; |
1752 | if (strpbrk(str + 1, "*?[\\") != NULL) | 1752 | if (strpbrk(str + 1, "*?[\\")) |
1753 | return EINA_FALSE; | 1753 | return EINA_FALSE; |
1754 | return EINA_TRUE; | 1754 | return EINA_TRUE; |
1755 | } | 1755 | } |
diff --git a/legacy/edje/src/lib/edje_program.c b/legacy/edje/src/lib/edje_program.c index fdaaf237d2..53092d4450 100644 --- a/legacy/edje/src/lib/edje_program.c +++ b/legacy/edje/src/lib/edje_program.c | |||
@@ -844,7 +844,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, | |||
844 | #ifdef LUA2 | 844 | #ifdef LUA2 |
845 | _edje_lua2_script_init(ed); | 845 | _edje_lua2_script_init(ed); |
846 | #else | 846 | #else |
847 | if (ed->L == NULL) /* private state does not yet exist, create it */ | 847 | if (!ed->L) /* private state does not yet exist, create it */ |
848 | { | 848 | { |
849 | ed->L = _edje_lua_new_thread(ed, _edje_lua_state_get()); | 849 | ed->L = _edje_lua_new_thread(ed, _edje_lua_state_get()); |
850 | } | 850 | } |
@@ -1032,7 +1032,7 @@ _edje_emit(Edje *ed, const char *sig, const char *src) | |||
1032 | 1032 | ||
1033 | /* The part contain a [index], retrieve it */ | 1033 | /* The part contain a [index], retrieve it */ |
1034 | idx = strchr(sig, EDJE_PART_PATH_SEPARATOR_INDEXL); | 1034 | idx = strchr(sig, EDJE_PART_PATH_SEPARATOR_INDEXL); |
1035 | if (idx == NULL || sep < idx) newsig = part + (sep - sig); | 1035 | if (!idx || sep < idx) newsig = part + (sep - sig); |
1036 | else newsig = part + (idx - sig); | 1036 | else newsig = part + (idx - sig); |
1037 | 1037 | ||
1038 | *newsig = '\0'; | 1038 | *newsig = '\0'; |
@@ -1391,7 +1391,7 @@ _edje_external_param_info_get(const Evas_Object *obj, const char *name) | |||
1391 | 1391 | ||
1392 | type = evas_object_data_get(obj, "Edje_External_Type"); | 1392 | type = evas_object_data_get(obj, "Edje_External_Type"); |
1393 | if (!type) return NULL; | 1393 | if (!type) return NULL; |
1394 | for (info = type->parameters_info; info->name != NULL; info++) | 1394 | for (info = type->parameters_info; info->name; info++) |
1395 | if (!strcmp(info->name, name)) return info; | 1395 | if (!strcmp(info->name, name)) return info; |
1396 | 1396 | ||
1397 | return NULL; | 1397 | return NULL; |
@@ -1974,7 +1974,7 @@ _edje_param_validate(const Edje_External_Param *param, const Edje_External_Param | |||
1974 | { | 1974 | { |
1975 | const char **itr = info->info.c.choices; | 1975 | const char **itr = info->info.c.choices; |
1976 | if (!itr) return EINA_FALSE; | 1976 | if (!itr) return EINA_FALSE; |
1977 | for (; *itr != NULL; itr++) | 1977 | for (; *itr; itr++) |
1978 | if (!strcmp(*itr, param->s)) | 1978 | if (!strcmp(*itr, param->s)) |
1979 | return EINA_TRUE; | 1979 | return EINA_TRUE; |
1980 | return EINA_FALSE; | 1980 | return EINA_FALSE; |
diff --git a/legacy/edje/src/lib/edje_text.c b/legacy/edje/src/lib/edje_text.c index 23dd35fe0e..2fdb0c53eb 100644 --- a/legacy/edje/src/lib/edje_text.c +++ b/legacy/edje/src/lib/edje_text.c | |||
@@ -394,7 +394,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep, | |||
394 | if (ep->text.cache.in_str) eina_stringshare_del(ep->text.cache.in_str); | 394 | if (ep->text.cache.in_str) eina_stringshare_del(ep->text.cache.in_str); |
395 | ep->text.cache.in_str = eina_stringshare_add(text); | 395 | ep->text.cache.in_str = eina_stringshare_add(text); |
396 | ep->text.cache.in_size = size; | 396 | ep->text.cache.in_size = size; |
397 | if (chosen_desc->text.fit_x && (ep->text.cache.in_str != NULL && eina_stringshare_strlen(ep->text.cache.in_str) > 0)) | 397 | if (chosen_desc->text.fit_x && (ep->text.cache.in_str && eina_stringshare_strlen(ep->text.cache.in_str) > 0)) |
398 | { | 398 | { |
399 | if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path); | 399 | if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path); |
400 | else evas_object_text_font_source_set(ep->object, NULL); | 400 | else evas_object_text_font_source_set(ep->object, NULL); |
@@ -437,7 +437,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep, | |||
437 | } | 437 | } |
438 | } | 438 | } |
439 | } | 439 | } |
440 | if (chosen_desc->text.fit_y && (ep->text.cache.in_str != NULL && eina_stringshare_strlen(ep->text.cache.in_str) > 0)) | 440 | if (chosen_desc->text.fit_y && (ep->text.cache.in_str && eina_stringshare_strlen(ep->text.cache.in_str) > 0)) |
441 | { | 441 | { |
442 | /* if we fit in the x axis, too, size already has a somewhat | 442 | /* if we fit in the x axis, too, size already has a somewhat |
443 | * meaningful value, so don't overwrite it with the starting | 443 | * meaningful value, so don't overwrite it with the starting |
diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 04c556cf2f..7e49f2aec8 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c | |||
@@ -2342,7 +2342,7 @@ _edje_box_layout_builtin_find(const char *name) | |||
2342 | return NULL; | 2342 | return NULL; |
2343 | } | 2343 | } |
2344 | 2344 | ||
2345 | for (; (base->name != NULL) && (base->name[0] == name[0]); base++) | 2345 | for (; (base->name) && (base->name[0] == name[0]); base++) |
2346 | if (strcmp(base->name, name) == 0) | 2346 | if (strcmp(base->name, name) == 0) |
2347 | return base->cb; | 2347 | return base->cb; |
2348 | 2348 | ||
@@ -4311,13 +4311,13 @@ _edje_real_part_recursive_get_helper(Edje *ed, char **path) | |||
4311 | if (alias) | 4311 | if (alias) |
4312 | { | 4312 | { |
4313 | rp = _edje_real_part_recursive_get(ed, alias); | 4313 | rp = _edje_real_part_recursive_get(ed, alias); |
4314 | if (path[1] == NULL) return rp; | 4314 | if (!path[1]) return rp; |
4315 | if (!rp) return NULL; | 4315 | if (!rp) return NULL; |
4316 | } | 4316 | } |
4317 | else | 4317 | else |
4318 | { | 4318 | { |
4319 | rp = _edje_real_part_get(ed, path[0]); | 4319 | rp = _edje_real_part_get(ed, path[0]); |
4320 | if (path[1] == NULL) return rp; | 4320 | if (!path[1]) return rp; |
4321 | if (!rp) return NULL; | 4321 | if (!rp) return NULL; |
4322 | } | 4322 | } |
4323 | 4323 | ||
@@ -4841,8 +4841,8 @@ _edje_program_remove(Edje_Part_Collection *edc, Edje_Program *p) | |||
4841 | array = &edc->programs.nocmp; | 4841 | array = &edc->programs.nocmp; |
4842 | count = &edc->programs.nocmp_count; | 4842 | count = &edc->programs.nocmp_count; |
4843 | } | 4843 | } |
4844 | else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL | 4844 | else if (p->signal && !strpbrk(p->signal, "*?[\\") |
4845 | && p->source && strpbrk(p->source, "*?[\\") == NULL) | 4845 | && p->source && !strpbrk(p->source, "*?[\\")) |
4846 | { | 4846 | { |
4847 | array = &edc->programs.strcmp; | 4847 | array = &edc->programs.strcmp; |
4848 | count = &edc->programs.strcmp_count; | 4848 | count = &edc->programs.strcmp_count; |
@@ -4885,8 +4885,8 @@ _edje_program_insert(Edje_Part_Collection *edc, Edje_Program *p) | |||
4885 | array = &edc->programs.nocmp; | 4885 | array = &edc->programs.nocmp; |
4886 | count = &edc->programs.nocmp_count; | 4886 | count = &edc->programs.nocmp_count; |
4887 | } | 4887 | } |
4888 | else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL | 4888 | else if (p->signal && !strpbrk(p->signal, "*?[\\") |
4889 | && p->source && strpbrk(p->source, "*?[\\") == NULL) | 4889 | && p->source && !strpbrk(p->source, "*?[\\")) |
4890 | { | 4890 | { |
4891 | array = &edc->programs.strcmp; | 4891 | array = &edc->programs.strcmp; |
4892 | count = &edc->programs.strcmp_count; | 4892 | count = &edc->programs.strcmp_count; |
diff --git a/legacy/eet/src/lib/eet_cipher.c b/legacy/eet/src/lib/eet_cipher.c index 782175904d..4b44143587 100644 --- a/legacy/eet/src/lib/eet_cipher.c +++ b/legacy/eet/src/lib/eet_cipher.c | |||
@@ -426,7 +426,7 @@ on_error: | |||
426 | void | 426 | void |
427 | eet_identity_ref(Eet_Key *key) | 427 | eet_identity_ref(Eet_Key *key) |
428 | { | 428 | { |
429 | if (key == NULL) | 429 | if (!key) |
430 | return; | 430 | return; |
431 | 431 | ||
432 | key->references++; | 432 | key->references++; |
@@ -435,7 +435,7 @@ eet_identity_ref(Eet_Key *key) | |||
435 | void | 435 | void |
436 | eet_identity_unref(Eet_Key *key) | 436 | eet_identity_unref(Eet_Key *key) |
437 | { | 437 | { |
438 | if (key == NULL) | 438 | if (!key) |
439 | return; | 439 | return; |
440 | 440 | ||
441 | key->references--; | 441 | key->references--; |
@@ -573,7 +573,7 @@ eet_identity_sign(FILE *fp, | |||
573 | # else /* ifdef HAVE_GNUTLS */ | 573 | # else /* ifdef HAVE_GNUTLS */ |
574 | sign_len = EVP_PKEY_size(key->private_key); | 574 | sign_len = EVP_PKEY_size(key->private_key); |
575 | sign = malloc(sign_len); | 575 | sign = malloc(sign_len); |
576 | if (sign == NULL) | 576 | if (!sign) |
577 | { | 577 | { |
578 | err = EET_ERROR_OUT_OF_MEMORY; | 578 | err = EET_ERROR_OUT_OF_MEMORY; |
579 | goto on_error; | 579 | goto on_error; |
@@ -717,7 +717,7 @@ eet_identity_check(const void *data_base, | |||
717 | gcry_md_write(md, data_base, data_length); | 717 | gcry_md_write(md, data_base, data_length); |
718 | 718 | ||
719 | hash = gcry_md_read(md, GCRY_MD_SHA1); | 719 | hash = gcry_md_read(md, GCRY_MD_SHA1); |
720 | if (hash == NULL) | 720 | if (!hash) |
721 | { | 721 | { |
722 | gcry_md_close(md); | 722 | gcry_md_close(md); |
723 | return NULL; | 723 | return NULL; |
@@ -773,12 +773,12 @@ eet_identity_check(const void *data_base, | |||
773 | tmp = alloca(cert_len); | 773 | tmp = alloca(cert_len); |
774 | memcpy((char *)tmp, cert_der, cert_len); | 774 | memcpy((char *)tmp, cert_der, cert_len); |
775 | x509 = d2i_X509(NULL, &tmp, cert_len); | 775 | x509 = d2i_X509(NULL, &tmp, cert_len); |
776 | if (x509 == NULL) | 776 | if (!x509) |
777 | return NULL; | 777 | return NULL; |
778 | 778 | ||
779 | /* Get public key - eay */ | 779 | /* Get public key - eay */ |
780 | pkey = X509_get_pubkey(x509); | 780 | pkey = X509_get_pubkey(x509); |
781 | if (pkey == NULL) | 781 | if (!pkey) |
782 | { | 782 | { |
783 | X509_free(x509); | 783 | X509_free(x509); |
784 | return NULL; | 784 | return NULL; |
@@ -864,7 +864,7 @@ on_error: | |||
864 | tmp = alloca(der_length); | 864 | tmp = alloca(der_length); |
865 | memcpy((char *)tmp, certificate, der_length); | 865 | memcpy((char *)tmp, certificate, der_length); |
866 | x509 = d2i_X509(NULL, &tmp, der_length); | 866 | x509 = d2i_X509(NULL, &tmp, der_length); |
867 | if (x509 == NULL) | 867 | if (!x509) |
868 | { | 868 | { |
869 | INF("Not a valid certificate."); | 869 | INF("Not a valid certificate."); |
870 | return; | 870 | return; |
@@ -1236,7 +1236,7 @@ eet_hmac_sha1(const void *key, | |||
1236 | gcry_md_write(mdh, data, data_len); | 1236 | gcry_md_write(mdh, data, data_len); |
1237 | 1237 | ||
1238 | hash = gcry_md_read(mdh, GCRY_MD_SHA1); | 1238 | hash = gcry_md_read(mdh, GCRY_MD_SHA1); |
1239 | if (hash == NULL) | 1239 | if (!hash) |
1240 | { | 1240 | { |
1241 | gcry_md_close(mdh); | 1241 | gcry_md_close(mdh); |
1242 | return 1; | 1242 | return 1; |
diff --git a/legacy/eet/src/lib/eet_data.c b/legacy/eet/src/lib/eet_data.c index 995d55b3da..2ae5246494 100644 --- a/legacy/eet/src/lib/eet_data.c +++ b/legacy/eet/src/lib/eet_data.c | |||
@@ -727,7 +727,7 @@ eet_data_get_string(const Eet_Dictionary *ed, | |||
727 | return -1; | 727 | return -1; |
728 | 728 | ||
729 | str = eet_dictionary_string_get_char(ed, idx); | 729 | str = eet_dictionary_string_get_char(ed, idx); |
730 | if (str == NULL) | 730 | if (!str) |
731 | return -1; | 731 | return -1; |
732 | 732 | ||
733 | *d = (char *)str; | 733 | *d = (char *)str; |
@@ -735,7 +735,7 @@ eet_data_get_string(const Eet_Dictionary *ed, | |||
735 | } | 735 | } |
736 | 736 | ||
737 | s = (char *)src; | 737 | s = (char *)src; |
738 | if (s == NULL) | 738 | if (!s) |
739 | { | 739 | { |
740 | *d = NULL; | 740 | *d = NULL; |
741 | return 0; | 741 | return 0; |
@@ -1873,7 +1873,7 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, | |||
1873 | || group_type == EET_G_VARIANT) | 1873 | || group_type == EET_G_VARIANT) |
1874 | && | 1874 | && |
1875 | (type != EET_T_UNKNOW | 1875 | (type != EET_T_UNKNOW |
1876 | || subtype == NULL | 1876 | || !subtype |
1877 | || subtype->func.type_get == NULL | 1877 | || subtype->func.type_get == NULL |
1878 | || subtype->func.type_set == NULL)) | 1878 | || subtype->func.type_set == NULL)) |
1879 | return; | 1879 | return; |
@@ -1918,7 +1918,7 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, | |||
1918 | && (group_type < EET_G_LAST) | 1918 | && (group_type < EET_G_LAST) |
1919 | && (((type > EET_T_UNKNOW) && (type < EET_T_STRING)) | 1919 | && (((type > EET_T_UNKNOW) && (type < EET_T_STRING)) |
1920 | || ((type > EET_T_NULL) && (type < EET_T_LAST))) | 1920 | || ((type > EET_T_NULL) && (type < EET_T_LAST))) |
1921 | && (subtype == NULL)) | 1921 | && (!subtype)) |
1922 | { | 1922 | { |
1923 | subtype = calloc(1, sizeof (Eet_Data_Descriptor)); | 1923 | subtype = calloc(1, sizeof (Eet_Data_Descriptor)); |
1924 | if (!subtype) | 1924 | if (!subtype) |
@@ -2522,7 +2522,7 @@ _eet_data_dump_encode(int parent_type, | |||
2522 | _eet_data_words_bigendian = 0; | 2522 | _eet_data_words_bigendian = 0; |
2523 | } | 2523 | } |
2524 | 2524 | ||
2525 | if (node == NULL) | 2525 | if (!node) |
2526 | return NULL; | 2526 | return NULL; |
2527 | 2527 | ||
2528 | ds = eet_data_stream_new(); | 2528 | ds = eet_data_stream_new(); |
@@ -4123,7 +4123,7 @@ eet_data_get_unknown(Eet_Free_Context *context, | |||
4123 | str = (char **)(((char *)data)); | 4123 | str = (char **)(((char *)data)); |
4124 | if (*str) | 4124 | if (*str) |
4125 | { | 4125 | { |
4126 | if ((ed == NULL) || (edd->func.str_direct_alloc == NULL)) | 4126 | if ((!ed) || (edd->func.str_direct_alloc == NULL)) |
4127 | { | 4127 | { |
4128 | *str = edd->func.str_alloc(*str); | 4128 | *str = edd->func.str_alloc(*str); |
4129 | _eet_freelist_str_add(context, *str); | 4129 | _eet_freelist_str_add(context, *str); |
diff --git a/legacy/eet/src/lib/eet_dictionary.c b/legacy/eet/src/lib/eet_dictionary.c index 7e86d0858f..23ef3b04c4 100644 --- a/legacy/eet/src/lib/eet_dictionary.c +++ b/legacy/eet/src/lib/eet_dictionary.c | |||
@@ -110,7 +110,7 @@ eet_dictionary_string_add(Eet_Dictionary *ed, | |||
110 | total = ed->total + 8; | 110 | total = ed->total + 8; |
111 | 111 | ||
112 | new = realloc(ed->all, sizeof (Eet_String) * total); | 112 | new = realloc(ed->all, sizeof (Eet_String) * total); |
113 | if (new == NULL) | 113 | if (!new) |
114 | return -1; | 114 | return -1; |
115 | 115 | ||
116 | ed->all = new; | 116 | ed->all = new; |
@@ -119,7 +119,7 @@ eet_dictionary_string_add(Eet_Dictionary *ed, | |||
119 | 119 | ||
120 | len = strlen(string) + 1; | 120 | len = strlen(string) + 1; |
121 | str = strdup(string); | 121 | str = strdup(string); |
122 | if (str == NULL) | 122 | if (!str) |
123 | return -1; | 123 | return -1; |
124 | 124 | ||
125 | current = ed->all + ed->count; | 125 | current = ed->all + ed->count; |
@@ -201,7 +201,7 @@ eet_dictionary_string_get_char(const Eet_Dictionary *ed, | |||
201 | { | 201 | { |
202 | #ifdef _WIN32 | 202 | #ifdef _WIN32 |
203 | /* Windows file system could change the mmaped file when replacing a file. So we need to copy all string in memory to avoid bugs. */ | 203 | /* Windows file system could change the mmaped file when replacing a file. So we need to copy all string in memory to avoid bugs. */ |
204 | if (ed->all[idx].str == NULL) | 204 | if (!ed->all[idx].str) |
205 | { | 205 | { |
206 | ed->all[idx].str = strdup(ed->all[idx].mmap); | 206 | ed->all[idx].str = strdup(ed->all[idx].mmap); |
207 | ed->all[idx].mmap = NULL; | 207 | ed->all[idx].mmap = NULL; |
@@ -397,7 +397,7 @@ eet_dictionary_string_check(Eet_Dictionary *ed, | |||
397 | { | 397 | { |
398 | int i; | 398 | int i; |
399 | 399 | ||
400 | if ((ed == NULL) || (string == NULL)) | 400 | if ((!ed) || (!string)) |
401 | return 0; | 401 | return 0; |
402 | 402 | ||
403 | if ((ed->start <= string) && (string < ed->end)) | 403 | if ((ed->start <= string) && (string < ed->end)) |
diff --git a/legacy/eet/src/lib/eet_image.c b/legacy/eet/src/lib/eet_image.c index 9c52dfd6a7..446ec3d58f 100644 --- a/legacy/eet/src/lib/eet_image.c +++ b/legacy/eet/src/lib/eet_image.c | |||
@@ -146,7 +146,7 @@ _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo) | |||
146 | unsigned char *buf; | 146 | unsigned char *buf; |
147 | 147 | ||
148 | if (dst->len >= 0x40000000 || | 148 | if (dst->len >= 0x40000000 || |
149 | (buf = realloc(dst->buf, dst->len * 2)) == NULL) | 149 | !(buf = realloc(dst->buf, dst->len * 2))) |
150 | { | 150 | { |
151 | dst->failed = 1; | 151 | dst->failed = 1; |
152 | dst->pub.next_output_byte = dst->buf; | 152 | dst->pub.next_output_byte = dst->buf; |
@@ -1279,7 +1279,7 @@ eet_data_image_encode_cipher(const void *data, | |||
1279 | 1279 | ||
1280 | /* eet_data_image_lossless_compressed_convert will refuse to compress something | 1280 | /* eet_data_image_lossless_compressed_convert will refuse to compress something |
1281 | if the result is bigger than the entry. */ | 1281 | if the result is bigger than the entry. */ |
1282 | if (comp <= 0 || d == NULL) | 1282 | if (comp <= 0 || !d) |
1283 | d = eet_data_image_lossless_convert(&size, data, w, h, alpha); | 1283 | d = eet_data_image_lossless_convert(&size, data, w, h, alpha); |
1284 | } | 1284 | } |
1285 | else | 1285 | else |
diff --git a/legacy/eet/src/lib/eet_lib.c b/legacy/eet/src/lib/eet_lib.c index c1ca7fad66..b736fc045d 100644 --- a/legacy/eet/src/lib/eet_lib.c +++ b/legacy/eet/src/lib/eet_lib.c | |||
@@ -1117,7 +1117,7 @@ eet_internal_read2(Eet_File *ef) | |||
1117 | &ef->signature_length, | 1117 | &ef->signature_length, |
1118 | &ef->x509_length); | 1118 | &ef->x509_length); |
1119 | 1119 | ||
1120 | if (eet_test_close(ef->x509_der == NULL, ef)) | 1120 | if (eet_test_close(!ef->x509_der, ef)) |
1121 | return NULL; | 1121 | return NULL; |
1122 | 1122 | ||
1123 | #else /* ifdef HAVE_SIGNATURE */ | 1123 | #else /* ifdef HAVE_SIGNATURE */ |
@@ -1264,7 +1264,7 @@ eet_internal_read1(Eet_File *ef) | |||
1264 | if (efn->free_name) | 1264 | if (efn->free_name) |
1265 | { | 1265 | { |
1266 | efn->name = malloc(sizeof(char) * name_size + 1); | 1266 | efn->name = malloc(sizeof(char) * name_size + 1); |
1267 | if (eet_test_close(efn->name == NULL, ef)) | 1267 | if (eet_test_close(!efn->name, ef)) |
1268 | { | 1268 | { |
1269 | free(efn); | 1269 | free(efn); |
1270 | return NULL; | 1270 | return NULL; |
@@ -1318,7 +1318,7 @@ eet_internal_read(Eet_File *ef) | |||
1318 | { | 1318 | { |
1319 | const int *data = (const int *)ef->data; | 1319 | const int *data = (const int *)ef->data; |
1320 | 1320 | ||
1321 | if (eet_test_close((ef->data == (void *)-1) || (ef->data == NULL), ef)) | 1321 | if (eet_test_close((ef->data == (void *)-1) || (!ef->data), ef)) |
1322 | return NULL; | 1322 | return NULL; |
1323 | 1323 | ||
1324 | if (eet_test_close(ef->data_size < (int)sizeof(int) * 3, ef)) | 1324 | if (eet_test_close(ef->data_size < (int)sizeof(int) * 3, ef)) |
@@ -1454,7 +1454,7 @@ eet_memopen_read(const void *data, | |||
1454 | { | 1454 | { |
1455 | Eet_File *ef; | 1455 | Eet_File *ef; |
1456 | 1456 | ||
1457 | if (data == NULL || size == 0) | 1457 | if (!data || size == 0) |
1458 | return NULL; | 1458 | return NULL; |
1459 | 1459 | ||
1460 | ef = malloc (sizeof (Eet_File)); | 1460 | ef = malloc (sizeof (Eet_File)); |
@@ -1552,7 +1552,7 @@ eet_open(const char *file, | |||
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | open_error: | 1554 | open_error: |
1555 | if (fp == NULL && mode == EET_FILE_MODE_READ) | 1555 | if (!fp && mode == EET_FILE_MODE_READ) |
1556 | goto on_error; | 1556 | goto on_error; |
1557 | } | 1557 | } |
1558 | else | 1558 | else |
@@ -1579,7 +1579,7 @@ open_error: | |||
1579 | if (ef) | 1579 | if (ef) |
1580 | { | 1580 | { |
1581 | /* reference it up and return it */ | 1581 | /* reference it up and return it */ |
1582 | if (fp != NULL) | 1582 | if (fp) |
1583 | fclose(fp); | 1583 | fclose(fp); |
1584 | 1584 | ||
1585 | ef->references++; | 1585 | ef->references++; |
@@ -2385,7 +2385,7 @@ eet_delete(Eet_File *ef, | |||
2385 | if (efn->data) | 2385 | if (efn->data) |
2386 | free(efn->data); | 2386 | free(efn->data); |
2387 | 2387 | ||
2388 | if (pefn == NULL) | 2388 | if (!pefn) |
2389 | ef->header->directory->nodes[hash] = efn->next; | 2389 | ef->header->directory->nodes[hash] = efn->next; |
2390 | else | 2390 | else |
2391 | pefn->next = efn->next; | 2391 | pefn->next = efn->next; |
diff --git a/legacy/eet/src/lib/eet_node.c b/legacy/eet/src/lib/eet_node.c index fd4f07a09d..db1c58c0ed 100644 --- a/legacy/eet/src/lib/eet_node.c +++ b/legacy/eet/src/lib/eet_node.c | |||
@@ -606,7 +606,7 @@ eet_node_dump(Eet_Node *n, | |||
606 | dumpfunc(dumpdata, "\";\n"); | 606 | dumpfunc(dumpdata, "\";\n"); |
607 | } | 607 | } |
608 | 608 | ||
609 | for (it = n->values; it != NULL; it = it->next) | 609 | for (it = n->values; it; it = it->next) |
610 | eet_node_dump(it, dumplevel + 2, dumpfunc, dumpdata); | 610 | eet_node_dump(it, dumplevel + 2, dumpfunc, dumpdata); |
611 | 611 | ||
612 | eet_node_dump_group_end(dumplevel, dumpfunc, dumpdata); | 612 | eet_node_dump_group_end(dumplevel, dumpfunc, dumpdata); |
@@ -653,7 +653,7 @@ eet_node_walk(void *parent, | |||
653 | case EET_G_UNKNOWN: | 653 | case EET_G_UNKNOWN: |
654 | me = cb->struct_alloc(root->name, user_data); | 654 | me = cb->struct_alloc(root->name, user_data); |
655 | 655 | ||
656 | for (it = root->values; it != NULL; it = it->next) | 656 | for (it = root->values; it; it = it->next) |
657 | eet_node_walk(me, it->name, it, cb, user_data); | 657 | eet_node_walk(me, it->name, it, cb, user_data); |
658 | 658 | ||
659 | break; | 659 | break; |
@@ -663,7 +663,7 @@ eet_node_walk(void *parent, | |||
663 | me = cb->array(root->type == EET_G_VAR_ARRAY ? EINA_TRUE : EINA_FALSE, | 663 | me = cb->array(root->type == EET_G_VAR_ARRAY ? EINA_TRUE : EINA_FALSE, |
664 | root->name, root->count, user_data); | 664 | root->name, root->count, user_data); |
665 | 665 | ||
666 | for (i = 0, it = root->values; it != NULL; it = it->next) | 666 | for (i = 0, it = root->values; it; it = it->next) |
667 | cb->insert(me, i++, eet_node_walk(NULL, | 667 | cb->insert(me, i++, eet_node_walk(NULL, |
668 | NULL, | 668 | NULL, |
669 | it, | 669 | it, |
@@ -675,7 +675,7 @@ eet_node_walk(void *parent, | |||
675 | case EET_G_LIST: | 675 | case EET_G_LIST: |
676 | me = cb->list(root->name, user_data); | 676 | me = cb->list(root->name, user_data); |
677 | 677 | ||
678 | for (it = root->values; it != NULL; it = it->next) | 678 | for (it = root->values; it; it = it->next) |
679 | cb->append(me, eet_node_walk(NULL, | 679 | cb->append(me, eet_node_walk(NULL, |
680 | NULL, | 680 | NULL, |
681 | it, | 681 | it, |
diff --git a/legacy/eet/src/tests/eet_suite.c b/legacy/eet/src/tests/eet_suite.c index 9c4d5f0a1c..408fcf5b6b 100644 --- a/legacy/eet/src/tests/eet_suite.c +++ b/legacy/eet/src/tests/eet_suite.c | |||
@@ -203,13 +203,13 @@ _eet_test_basic_check(Eet_Test_Basic_Type * result, int i) | |||
203 | 203 | ||
204 | fail_if(tmp > 0.00005); | 204 | fail_if(tmp > 0.00005); |
205 | 205 | ||
206 | fail_if(result->empty != NULL); | 206 | fail_if(!!result->empty); |
207 | if (i == 0) | 207 | if (i == 0) |
208 | { | 208 | { |
209 | Eet_Test_Basic_Type * tmp; | 209 | Eet_Test_Basic_Type * tmp; |
210 | 210 | ||
211 | tmp = result->with; | 211 | tmp = result->with; |
212 | fail_if(tmp == NULL); | 212 | fail_if(!tmp); |
213 | 213 | ||
214 | fail_if(tmp->c != EET_TEST_CHAR); | 214 | fail_if(tmp->c != EET_TEST_CHAR); |
215 | fail_if(tmp->s != EET_TEST_SHORT); | 215 | fail_if(tmp->s != EET_TEST_SHORT); |
@@ -223,7 +223,7 @@ _eet_test_basic_check(Eet_Test_Basic_Type * result, int i) | |||
223 | fail_if(tmp->ul != EET_TEST_LONG_LONG); | 223 | fail_if(tmp->ul != EET_TEST_LONG_LONG); |
224 | } | 224 | } |
225 | else | 225 | else |
226 | fail_if(result->with != NULL); | 226 | fail_if(!!result->with); |
227 | } /* _eet_test_basic_check */ | 227 | } /* _eet_test_basic_check */ |
228 | 228 | ||
229 | static void | 229 | static void |
@@ -895,7 +895,7 @@ START_TEST(eet_file_simple_write) | |||
895 | 895 | ||
896 | fail_if(eet_mode_get(ef) != EET_FILE_MODE_WRITE); | 896 | fail_if(eet_mode_get(ef) != EET_FILE_MODE_WRITE); |
897 | 897 | ||
898 | fail_if(eet_list(ef, "*", &size) != NULL); | 898 | fail_if(!!eet_list(ef, "*", &size)); |
899 | fail_if(eet_num_entries(ef) != -1); | 899 | fail_if(eet_num_entries(ef) != -1); |
900 | 900 | ||
901 | eet_close(ef); | 901 | eet_close(ef); |
@@ -1036,11 +1036,11 @@ START_TEST(eet_file_data_test) | |||
1036 | /* Test the resulting data. */ | 1036 | /* Test the resulting data. */ |
1037 | fail_if(_eet_test_ex_check(result, 0) != 0); | 1037 | fail_if(_eet_test_ex_check(result, 0) != 0); |
1038 | fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0); | 1038 | fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0); |
1039 | fail_if(eina_list_data_get(result->ilist) == NULL); | 1039 | fail_if(!eina_list_data_get(result->ilist)); |
1040 | fail_if(*((int *)eina_list_data_get(result->ilist)) != 42); | 1040 | fail_if(*((int *)eina_list_data_get(result->ilist)) != 42); |
1041 | fail_if(eina_list_data_get(result->slist) == NULL); | 1041 | fail_if(!eina_list_data_get(result->slist)); |
1042 | fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0); | 1042 | fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0); |
1043 | fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL); | 1043 | fail_if(!eina_hash_find(result->shash, EET_TEST_KEY1)); |
1044 | fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0); | 1044 | fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0); |
1045 | fail_if(strcmp(result->charray[0], "test") != 0); | 1045 | fail_if(strcmp(result->charray[0], "test") != 0); |
1046 | 1046 | ||
@@ -1074,13 +1074,13 @@ START_TEST(eet_file_data_test) | |||
1074 | fail_if(eet_num_entries(ef) != 1); | 1074 | fail_if(eet_num_entries(ef) != 1); |
1075 | 1075 | ||
1076 | /* Test some more wrong case */ | 1076 | /* Test some more wrong case */ |
1077 | fail_if(eet_data_read(ef, edd, "plop") != NULL); | 1077 | fail_if(!!eet_data_read(ef, edd, "plop")); |
1078 | fail_if(eet_data_read(ef, edd, EET_TEST_FILE_KEY1) != NULL); | 1078 | fail_if(!!eet_data_read(ef, edd, EET_TEST_FILE_KEY1)); |
1079 | 1079 | ||
1080 | /* Reinsert and reread data */ | 1080 | /* Reinsert and reread data */ |
1081 | fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY1, &etbt, 0)); | 1081 | fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY1, &etbt, 0)); |
1082 | fail_if(eet_data_read(ef, edd, EET_TEST_FILE_KEY1) == NULL); | 1082 | fail_if(!eet_data_read(ef, edd, EET_TEST_FILE_KEY1)); |
1083 | fail_if(eet_read_direct(ef, EET_TEST_FILE_KEY1, &size) == NULL); | 1083 | fail_if(!eet_read_direct(ef, EET_TEST_FILE_KEY1, &size)); |
1084 | 1084 | ||
1085 | eet_close(ef); | 1085 | eet_close(ef); |
1086 | 1086 | ||
@@ -1163,11 +1163,11 @@ START_TEST(eet_file_data_dump_test) | |||
1163 | /* Test the resulting data. */ | 1163 | /* Test the resulting data. */ |
1164 | fail_if(_eet_test_ex_check(result, 0) != 0); | 1164 | fail_if(_eet_test_ex_check(result, 0) != 0); |
1165 | fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0); | 1165 | fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0); |
1166 | fail_if(eina_list_data_get(result->ilist) == NULL); | 1166 | fail_if(!eina_list_data_get(result->ilist)); |
1167 | fail_if(*((int *)eina_list_data_get(result->ilist)) != 42); | 1167 | fail_if(*((int *)eina_list_data_get(result->ilist)) != 42); |
1168 | fail_if(eina_list_data_get(result->slist) == NULL); | 1168 | fail_if(!eina_list_data_get(result->slist)); |
1169 | fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0); | 1169 | fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0); |
1170 | fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL); | 1170 | fail_if(!eina_hash_find(result->shash, EET_TEST_KEY1)); |
1171 | fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0); | 1171 | fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0); |
1172 | fail_if(strcmp(result->charray[0], "test") != 0); | 1172 | fail_if(strcmp(result->charray[0], "test") != 0); |
1173 | 1173 | ||
@@ -1307,7 +1307,7 @@ START_TEST(eet_image) | |||
1307 | &compress, | 1307 | &compress, |
1308 | &quality, | 1308 | &quality, |
1309 | &lossy); | 1309 | &lossy); |
1310 | fail_if(data == NULL); | 1310 | fail_if(!data); |
1311 | fail_if(w != test_noalpha.w); | 1311 | fail_if(w != test_noalpha.w); |
1312 | fail_if(h != test_noalpha.h); | 1312 | fail_if(h != test_noalpha.h); |
1313 | fail_if(alpha != test_noalpha.alpha); | 1313 | fail_if(alpha != test_noalpha.alpha); |
@@ -1353,7 +1353,7 @@ START_TEST(eet_image) | |||
1353 | fail_if(lossy != 0); | 1353 | fail_if(lossy != 0); |
1354 | 1354 | ||
1355 | data = malloc(w * h * 4); | 1355 | data = malloc(w * h * 4); |
1356 | fail_if(data == NULL); | 1356 | fail_if(!data); |
1357 | result = eet_data_image_read_to_surface(ef, | 1357 | result = eet_data_image_read_to_surface(ef, |
1358 | EET_TEST_FILE_IMAGE "0", | 1358 | EET_TEST_FILE_IMAGE "0", |
1359 | 4, | 1359 | 4, |
@@ -1375,7 +1375,7 @@ START_TEST(eet_image) | |||
1375 | free(data); | 1375 | free(data); |
1376 | 1376 | ||
1377 | data = malloc(w * h * 4); | 1377 | data = malloc(w * h * 4); |
1378 | fail_if(data == NULL); | 1378 | fail_if(!data); |
1379 | result = eet_data_image_read_to_surface(ef, | 1379 | result = eet_data_image_read_to_surface(ef, |
1380 | EET_TEST_FILE_IMAGE "0", | 1380 | EET_TEST_FILE_IMAGE "0", |
1381 | 0, | 1381 | 0, |
@@ -1404,7 +1404,7 @@ START_TEST(eet_image) | |||
1404 | &compress, | 1404 | &compress, |
1405 | &quality, | 1405 | &quality, |
1406 | &lossy); | 1406 | &lossy); |
1407 | fail_if(data == NULL); | 1407 | fail_if(!data); |
1408 | fail_if(w != test_noalpha.w); | 1408 | fail_if(w != test_noalpha.w); |
1409 | fail_if(h != test_noalpha.h); | 1409 | fail_if(h != test_noalpha.h); |
1410 | fail_if(alpha != test_noalpha.alpha); | 1410 | fail_if(alpha != test_noalpha.alpha); |
@@ -1422,7 +1422,7 @@ START_TEST(eet_image) | |||
1422 | &compress, | 1422 | &compress, |
1423 | &quality, | 1423 | &quality, |
1424 | &lossy); | 1424 | &lossy); |
1425 | fail_if(data == NULL); | 1425 | fail_if(!data); |
1426 | fail_if(w != test_noalpha.w); | 1426 | fail_if(w != test_noalpha.w); |
1427 | fail_if(h != test_noalpha.h); | 1427 | fail_if(h != test_noalpha.h); |
1428 | fail_if(alpha != test_noalpha.alpha); | 1428 | fail_if(alpha != test_noalpha.alpha); |
@@ -1439,7 +1439,7 @@ START_TEST(eet_image) | |||
1439 | &compress, | 1439 | &compress, |
1440 | &quality, | 1440 | &quality, |
1441 | &lossy); | 1441 | &lossy); |
1442 | fail_if(data == NULL); | 1442 | fail_if(!data); |
1443 | fail_if(w != test_noalpha.w); | 1443 | fail_if(w != test_noalpha.w); |
1444 | fail_if(h != test_noalpha.h); | 1444 | fail_if(h != test_noalpha.h); |
1445 | fail_if(alpha != test_noalpha.alpha); | 1445 | fail_if(alpha != test_noalpha.alpha); |
@@ -1454,7 +1454,7 @@ START_TEST(eet_image) | |||
1454 | &compress, | 1454 | &compress, |
1455 | &quality, | 1455 | &quality, |
1456 | &lossy); | 1456 | &lossy); |
1457 | fail_if(data == NULL); | 1457 | fail_if(!data); |
1458 | fail_if(w != test_noalpha.w); | 1458 | fail_if(w != test_noalpha.w); |
1459 | fail_if(h != test_noalpha.h); | 1459 | fail_if(h != test_noalpha.h); |
1460 | fail_if(alpha != test_noalpha.alpha); | 1460 | fail_if(alpha != test_noalpha.alpha); |
@@ -1469,7 +1469,7 @@ START_TEST(eet_image) | |||
1469 | &compress, | 1469 | &compress, |
1470 | &quality, | 1470 | &quality, |
1471 | &lossy); | 1471 | &lossy); |
1472 | fail_if(data == NULL); | 1472 | fail_if(!data); |
1473 | fail_if(w != test_noalpha.w); | 1473 | fail_if(w != test_noalpha.w); |
1474 | fail_if(h != test_noalpha.h); | 1474 | fail_if(h != test_noalpha.h); |
1475 | fail_if(alpha != test_noalpha.alpha); | 1475 | fail_if(alpha != test_noalpha.alpha); |
@@ -1499,7 +1499,7 @@ START_TEST(eet_image) | |||
1499 | &compress, | 1499 | &compress, |
1500 | &quality, | 1500 | &quality, |
1501 | &lossy); | 1501 | &lossy); |
1502 | fail_if(data == NULL); | 1502 | fail_if(!data); |
1503 | fail_if(w != test_alpha.w); | 1503 | fail_if(w != test_alpha.w); |
1504 | fail_if(h != test_alpha.h); | 1504 | fail_if(h != test_alpha.h); |
1505 | fail_if(alpha != test_alpha.alpha); | 1505 | fail_if(alpha != test_alpha.alpha); |
@@ -1530,7 +1530,7 @@ START_TEST(eet_image) | |||
1530 | &compress, | 1530 | &compress, |
1531 | &quality, | 1531 | &quality, |
1532 | &lossy); | 1532 | &lossy); |
1533 | fail_if(data == NULL); | 1533 | fail_if(!data); |
1534 | fail_if(w != test_alpha.w); | 1534 | fail_if(w != test_alpha.w); |
1535 | fail_if(h != test_alpha.h); | 1535 | fail_if(h != test_alpha.h); |
1536 | fail_if(alpha != test_alpha.alpha); | 1536 | fail_if(alpha != test_alpha.alpha); |
@@ -1654,7 +1654,7 @@ START_TEST(eet_identity_simple) | |||
1654 | fail_if(memcmp(test, buffer, strlen(buffer) + 1) != 0); | 1654 | fail_if(memcmp(test, buffer, strlen(buffer) + 1) != 0); |
1655 | 1655 | ||
1656 | tmp = eet_identity_x509(ef, &size); | 1656 | tmp = eet_identity_x509(ef, &size); |
1657 | fail_if(tmp == NULL); | 1657 | fail_if(!tmp); |
1658 | 1658 | ||
1659 | eet_identity_certificate_print(tmp, size, noread); | 1659 | eet_identity_certificate_print(tmp, size, noread); |
1660 | 1660 | ||
@@ -1850,7 +1850,7 @@ open_close_worker(void * path) | |||
1850 | while (!open_worker_stop) | 1850 | while (!open_worker_stop) |
1851 | { | 1851 | { |
1852 | Eet_File * ef = eet_open((char const *)path, EET_FILE_MODE_READ); | 1852 | Eet_File * ef = eet_open((char const *)path, EET_FILE_MODE_READ); |
1853 | if (ef == NULL) | 1853 | if (!ef) |
1854 | pthread_exit("eet_open() failed"); | 1854 | pthread_exit("eet_open() failed"); |
1855 | else | 1855 | else |
1856 | { | 1856 | { |
@@ -1871,7 +1871,7 @@ open_close_worker(void * path) | |||
1871 | while (!open_worker_stop) | 1871 | while (!open_worker_stop) |
1872 | { | 1872 | { |
1873 | Eet_File * ef = eet_open((char const *)path, EET_FILE_MODE_READ); | 1873 | Eet_File * ef = eet_open((char const *)path, EET_FILE_MODE_READ); |
1874 | if (ef == NULL) | 1874 | if (!ef) |
1875 | _endthreadex(-1); | 1875 | _endthreadex(-1); |
1876 | else | 1876 | else |
1877 | { | 1877 | { |
@@ -1964,11 +1964,11 @@ _eet_connection_read(const void * eet_data, size_t size, void * user_data) | |||
1964 | fail_if(!node); | 1964 | fail_if(!node); |
1965 | fail_if(_eet_test_ex_check(result, 0) != 0); | 1965 | fail_if(_eet_test_ex_check(result, 0) != 0); |
1966 | fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0); | 1966 | fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0); |
1967 | fail_if(eina_list_data_get(result->ilist) == NULL); | 1967 | fail_if(!eina_list_data_get(result->ilist)); |
1968 | fail_if(*((int *)eina_list_data_get(result->ilist)) != 42); | 1968 | fail_if(*((int *)eina_list_data_get(result->ilist)) != 42); |
1969 | fail_if(eina_list_data_get(result->slist) == NULL); | 1969 | fail_if(!eina_list_data_get(result->slist)); |
1970 | fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0); | 1970 | fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0); |
1971 | fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL); | 1971 | fail_if(!eina_hash_find(result->shash, EET_TEST_KEY1)); |
1972 | fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0); | 1972 | fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0); |
1973 | fail_if(strcmp(result->charray[0], "test") != 0); | 1973 | fail_if(strcmp(result->charray[0], "test") != 0); |
1974 | 1974 | ||
@@ -2329,7 +2329,7 @@ _eet_union_type_get(const void * data, Eina_Bool * unknow) | |||
2329 | if (unknow) | 2329 | if (unknow) |
2330 | *unknow = EINA_FALSE; | 2330 | *unknow = EINA_FALSE; |
2331 | 2331 | ||
2332 | for (i = 0; eet_mapping[i].name != NULL; ++i) | 2332 | for (i = 0; eet_mapping[i].name; ++i) |
2333 | if (*u == eet_mapping[i].u) | 2333 | if (*u == eet_mapping[i].u) |
2334 | return eet_mapping[i].name; | 2334 | return eet_mapping[i].name; |
2335 | 2335 | ||
@@ -2348,7 +2348,7 @@ _eet_union_type_set(const char * type, void * data, Eina_Bool unknow) | |||
2348 | if (unknow) | 2348 | if (unknow) |
2349 | return EINA_FALSE; | 2349 | return EINA_FALSE; |
2350 | 2350 | ||
2351 | for (i = 0; eet_mapping[i].name != NULL; ++i) | 2351 | for (i = 0; eet_mapping[i].name; ++i) |
2352 | if (strcmp(eet_mapping[i].name, type) == 0) | 2352 | if (strcmp(eet_mapping[i].name, type) == 0) |
2353 | { | 2353 | { |
2354 | *u = eet_mapping[i].u; | 2354 | *u = eet_mapping[i].u; |
@@ -2367,7 +2367,7 @@ _eet_variant_type_get(const void * data, Eina_Bool * unknow) | |||
2367 | if (unknow) | 2367 | if (unknow) |
2368 | *unknow = type->unknow; | 2368 | *unknow = type->unknow; |
2369 | 2369 | ||
2370 | for (i = 0; eet_mapping[i].name != NULL; ++i) | 2370 | for (i = 0; eet_mapping[i].name; ++i) |
2371 | if (strcmp(type->type, eet_mapping[i].name) == 0) | 2371 | if (strcmp(type->type, eet_mapping[i].name) == 0) |
2372 | return eet_mapping[i].name; | 2372 | return eet_mapping[i].name; |
2373 | 2373 | ||
diff --git a/legacy/efreet/src/lib/efreet_desktop_command.c b/legacy/efreet/src/lib/efreet_desktop_command.c index 9a563c5d80..461d934c92 100644 --- a/legacy/efreet/src/lib/efreet_desktop_command.c +++ b/legacy/efreet/src/lib/efreet_desktop_command.c | |||
@@ -489,7 +489,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command) | |||
489 | * fields (fFuUdDnN). We only want to run the app once in this case. */ | 489 | * fields (fFuUdDnN). We only want to run the app once in this case. */ |
490 | if (!file_added) break; | 490 | if (!file_added) break; |
491 | } | 491 | } |
492 | while ((l = eina_list_next(l)) != NULL); | 492 | while ((l = eina_list_next(l))); |
493 | 493 | ||
494 | return execs; | 494 | return execs; |
495 | error: | 495 | error: |
diff --git a/legacy/efreet/src/lib/efreet_icon.c b/legacy/efreet/src/lib/efreet_icon.c index 7157f3415e..4c33523f54 100644 --- a/legacy/efreet/src/lib/efreet_icon.c +++ b/legacy/efreet/src/lib/efreet_icon.c | |||
@@ -107,7 +107,7 @@ efreet_icon_init(void) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | /* setup the default extension list */ | 109 | /* setup the default extension list */ |
110 | for (i = 0; default_exts[i] != NULL; i++) | 110 | for (i = 0; default_exts[i]; i++) |
111 | efreet_icon_extensions = eina_list_append(efreet_icon_extensions, eina_stringshare_add(default_exts[i])); | 111 | efreet_icon_extensions = eina_list_append(efreet_icon_extensions, eina_stringshare_add(default_exts[i])); |
112 | 112 | ||
113 | efreet_icon_themes = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_icon_theme_free)); | 113 | efreet_icon_themes = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_icon_theme_free)); |
@@ -659,7 +659,7 @@ efreet_icon_lookup_icon(Efreet_Icon_Theme *theme, const char *icon_name, | |||
659 | double minimal_distance = INT_MAX; | 659 | double minimal_distance = INT_MAX; |
660 | unsigned int ret_size = 0; | 660 | unsigned int ret_size = 0; |
661 | 661 | ||
662 | if (!theme || (theme->paths == NULL) || !icon_name || !size) | 662 | if (!theme || (!theme->paths) || !icon_name || !size) |
663 | return NULL; | 663 | return NULL; |
664 | 664 | ||
665 | icon = efreet_icon_cache_check(theme, icon_name, size); | 665 | icon = efreet_icon_cache_check(theme, icon_name, size); |
@@ -1317,7 +1317,7 @@ efreet_icon_theme_dir_scan(const char *search_dir, const char *theme_name) | |||
1317 | /* only care if this is a directory or the theme name matches the | 1317 | /* only care if this is a directory or the theme name matches the |
1318 | * given name */ | 1318 | * given name */ |
1319 | snprintf(path, sizeof(path), "%s/%s", search_dir, dir->d_name); | 1319 | snprintf(path, sizeof(path), "%s/%s", search_dir, dir->d_name); |
1320 | if (((theme_name != NULL) && (strcmp(theme_name, dir->d_name))) | 1320 | if (((theme_name) && (strcmp(theme_name, dir->d_name))) |
1321 | || !ecore_file_is_dir(path)) | 1321 | || !ecore_file_is_dir(path)) |
1322 | continue; | 1322 | continue; |
1323 | 1323 | ||
diff --git a/legacy/efreet/src/lib/efreet_ini.c b/legacy/efreet/src/lib/efreet_ini.c index ecb9bd4c3d..c20f46de5e 100644 --- a/legacy/efreet/src/lib/efreet_ini.c +++ b/legacy/efreet/src/lib/efreet_ini.c | |||
@@ -183,7 +183,7 @@ efreet_ini_parse(const char *file) | |||
183 | goto next_line; | 183 | goto next_line; |
184 | } | 184 | } |
185 | 185 | ||
186 | if (section == NULL) | 186 | if (!section) |
187 | { | 187 | { |
188 | // INF("Invalid file (%s) (missing section)", file); | 188 | // INF("Invalid file (%s) (missing section)", file); |
189 | goto next_line; | 189 | goto next_line; |
diff --git a/legacy/efreet/src/lib/efreet_menu.c b/legacy/efreet/src/lib/efreet_menu.c index e9c1566e2e..e5168e5a7f 100644 --- a/legacy/efreet/src/lib/efreet_menu.c +++ b/legacy/efreet/src/lib/efreet_menu.c | |||
@@ -490,7 +490,7 @@ efreet_menu_init(void) | |||
490 | * to handle it */ | 490 | * to handle it */ |
491 | efreet_tag_menu = eina_stringshare_add(menu_cbs[0].key); | 491 | efreet_tag_menu = eina_stringshare_add(menu_cbs[0].key); |
492 | 492 | ||
493 | for (i = 0; menu_cbs[i].key != NULL; i++) | 493 | for (i = 0; menu_cbs[i].key; i++) |
494 | { | 494 | { |
495 | eina_hash_del(efreet_menu_handle_cbs, | 495 | eina_hash_del(efreet_menu_handle_cbs, |
496 | menu_cbs[i].key, | 496 | menu_cbs[i].key, |
@@ -499,7 +499,7 @@ efreet_menu_init(void) | |||
499 | menu_cbs[i].key, | 499 | menu_cbs[i].key, |
500 | menu_cbs[i].cb); | 500 | menu_cbs[i].cb); |
501 | } | 501 | } |
502 | for (i = 0; filter_cbs[i].key != NULL; i++) | 502 | for (i = 0; filter_cbs[i].key; i++) |
503 | { | 503 | { |
504 | eina_hash_del(efreet_menu_filter_cbs, | 504 | eina_hash_del(efreet_menu_filter_cbs, |
505 | filter_cbs[i].key, | 505 | filter_cbs[i].key, |
@@ -508,7 +508,7 @@ efreet_menu_init(void) | |||
508 | filter_cbs[i].key, | 508 | filter_cbs[i].key, |
509 | filter_cbs[i].cb); | 509 | filter_cbs[i].cb); |
510 | } | 510 | } |
511 | for (i = 0; move_cbs[i].key != NULL; i++) | 511 | for (i = 0; move_cbs[i].key; i++) |
512 | { | 512 | { |
513 | eina_hash_del(efreet_menu_move_cbs, | 513 | eina_hash_del(efreet_menu_move_cbs, |
514 | move_cbs[i].key, | 514 | move_cbs[i].key, |
@@ -517,7 +517,7 @@ efreet_menu_init(void) | |||
517 | move_cbs[i].key, | 517 | move_cbs[i].key, |
518 | move_cbs[i].cb); | 518 | move_cbs[i].cb); |
519 | } | 519 | } |
520 | for (i = 0; layout_cbs[i].key != NULL; i++) | 520 | for (i = 0; layout_cbs[i].key; i++) |
521 | { | 521 | { |
522 | eina_hash_del(efreet_menu_layout_cbs, | 522 | eina_hash_del(efreet_menu_layout_cbs, |
523 | layout_cbs[i].key, | 523 | layout_cbs[i].key, |
diff --git a/legacy/efreet/src/tests/compare/efreet_alloc.c b/legacy/efreet/src/tests/compare/efreet_alloc.c index 98d11ae8f5..a6582e1399 100644 --- a/legacy/efreet/src/tests/compare/efreet_alloc.c +++ b/legacy/efreet/src/tests/compare/efreet_alloc.c | |||
@@ -13,7 +13,7 @@ main(void) | |||
13 | 13 | ||
14 | for (k = 0; k < LOOPS; k++) | 14 | for (k = 0; k < LOOPS; k++) |
15 | { | 15 | { |
16 | for (i = 0; icons[i] != NULL; i++) | 16 | for (i = 0; icons[i]; i++) |
17 | { | 17 | { |
18 | path = efreet_icon_path_find(THEME, icons[i], SIZE); | 18 | path = efreet_icon_path_find(THEME, icons[i], SIZE); |
19 | // printf("%s: %s\n", icons[i], (path ? path : "NOT FOUND")); | 19 | // printf("%s: %s\n", icons[i], (path ? path : "NOT FOUND")); |
diff --git a/legacy/efreet/src/tests/ef_data_dirs.c b/legacy/efreet/src/tests/ef_data_dirs.c index f5705fd659..d6c629b5ea 100644 --- a/legacy/efreet/src/tests/ef_data_dirs.c +++ b/legacy/efreet/src/tests/ef_data_dirs.c | |||
@@ -169,7 +169,7 @@ ef_cb_efreet_data_dirs(void) | |||
169 | char *def_vals[] = {PACKAGE_DATA_DIR, "/usr/share", "/usr/local/share", NULL}; | 169 | char *def_vals[] = {PACKAGE_DATA_DIR, "/usr/share", "/usr/local/share", NULL}; |
170 | 170 | ||
171 | dirs[0] = '\0'; | 171 | dirs[0] = '\0'; |
172 | for (i = 0; vals[i] != NULL; i++) | 172 | for (i = 0; vals[i]; i++) |
173 | { | 173 | { |
174 | if (i > 0) strcat(dirs, ":"); | 174 | if (i > 0) strcat(dirs, ":"); |
175 | strcat(dirs, vals[i]); | 175 | strcat(dirs, vals[i]); |
@@ -183,7 +183,7 @@ ef_cb_efreet_data_dirs(void) | |||
183 | tmp = efreet_data_dirs_get(); | 183 | tmp = efreet_data_dirs_get(); |
184 | EINA_LIST_FOREACH(tmp, l, val) | 184 | EINA_LIST_FOREACH(tmp, l, val) |
185 | { | 185 | { |
186 | if (vals[i] == NULL) | 186 | if (!vals[i]) |
187 | { | 187 | { |
188 | printf("efreet_data_dirs_get() returned more values then it " | 188 | printf("efreet_data_dirs_get() returned more values then it " |
189 | "should have given %s as input\n", dirs); | 189 | "should have given %s as input\n", dirs); |
@@ -215,7 +215,7 @@ ef_cb_efreet_data_dirs(void) | |||
215 | 215 | ||
216 | EINA_LIST_FOREACH(tmp, l, val) | 216 | EINA_LIST_FOREACH(tmp, l, val) |
217 | { | 217 | { |
218 | if (def_vals[i] == NULL) | 218 | if (!def_vals[i]) |
219 | { | 219 | { |
220 | printf("efreet_data_dirs_get() returned more values then it " | 220 | printf("efreet_data_dirs_get() returned more values then it " |
221 | "should have given %s as input\n", dirs); | 221 | "should have given %s as input\n", dirs); |
@@ -246,7 +246,7 @@ ef_cb_efreet_config_dirs(void) | |||
246 | 246 | ||
247 | dirs[0] = '\0'; | 247 | dirs[0] = '\0'; |
248 | 248 | ||
249 | for (i = 0; vals[i] != NULL; i++) | 249 | for (i = 0; vals[i]; i++) |
250 | { | 250 | { |
251 | if (i > 0) strcat(dirs, ":"); | 251 | if (i > 0) strcat(dirs, ":"); |
252 | strcat(dirs, vals[i]); | 252 | strcat(dirs, vals[i]); |
@@ -260,7 +260,7 @@ ef_cb_efreet_config_dirs(void) | |||
260 | tmp = efreet_config_dirs_get(); | 260 | tmp = efreet_config_dirs_get(); |
261 | EINA_LIST_FOREACH(tmp, l, val) | 261 | EINA_LIST_FOREACH(tmp, l, val) |
262 | { | 262 | { |
263 | if (vals[i] == NULL) | 263 | if (!vals[i]) |
264 | { | 264 | { |
265 | printf("efreet_config_dirs_get() returned more values then it " | 265 | printf("efreet_config_dirs_get() returned more values then it " |
266 | "should have given %s as input\n", dirs); | 266 | "should have given %s as input\n", dirs); |
@@ -286,7 +286,7 @@ ef_cb_efreet_config_dirs(void) | |||
286 | tmp = efreet_config_dirs_get(); | 286 | tmp = efreet_config_dirs_get(); |
287 | EINA_LIST_FOREACH(tmp, l, val) | 287 | EINA_LIST_FOREACH(tmp, l, val) |
288 | { | 288 | { |
289 | if (def_vals[i] == NULL) | 289 | if (!def_vals[i]) |
290 | { | 290 | { |
291 | printf("efreet_config_dirs_get() returned more values then it " | 291 | printf("efreet_config_dirs_get() returned more values then it " |
292 | "should have given %s as input\n", dirs); | 292 | "should have given %s as input\n", dirs); |
diff --git a/legacy/efreet/src/tests/ef_icon_theme.c b/legacy/efreet/src/tests/ef_icon_theme.c index 3b5c70119f..bb66698885 100644 --- a/legacy/efreet/src/tests/ef_icon_theme.c +++ b/legacy/efreet/src/tests/ef_icon_theme.c | |||
@@ -478,7 +478,7 @@ ef_cb_efreet_icon_match(void) | |||
478 | themes = eina_list_remove_list(themes, themes); | 478 | themes = eina_list_remove_list(themes, themes); |
479 | 479 | ||
480 | double start = ecore_time_get(); | 480 | double start = ecore_time_get(); |
481 | for (i = 0; system_icons[i] != NULL; i++) | 481 | for (i = 0; system_icons[i]; i++) |
482 | { | 482 | { |
483 | char *path, *s; | 483 | char *path, *s; |
484 | 484 | ||
@@ -516,7 +516,7 @@ ef_cb_efreet_icon_match(void) | |||
516 | eina_hash_free(icon_hash); | 516 | eina_hash_free(icon_hash); |
517 | 517 | ||
518 | start = ecore_time_get(); | 518 | start = ecore_time_get(); |
519 | for (i = 0; system_icons[i] != NULL; i++) | 519 | for (i = 0; system_icons[i]; i++) |
520 | { | 520 | { |
521 | char *path, *s; | 521 | char *path, *s; |
522 | 522 | ||
diff --git a/legacy/efreet/src/tests/ef_locale.c b/legacy/efreet/src/tests/ef_locale.c index d71799ecde..cfc50e2626 100644 --- a/legacy/efreet/src/tests/ef_locale.c +++ b/legacy/efreet/src/tests/ef_locale.c | |||
@@ -44,7 +44,7 @@ ef_cb_locale(void) | |||
44 | putenv("LC_MESSAGES="); | 44 | putenv("LC_MESSAGES="); |
45 | putenv("LANG="); | 45 | putenv("LANG="); |
46 | 46 | ||
47 | for (i = 0; langs[i].lc_message != NULL; i++) | 47 | for (i = 0; langs[i].lc_message; i++) |
48 | { | 48 | { |
49 | const char *tmp; | 49 | const char *tmp; |
50 | 50 | ||
diff --git a/legacy/efreet/src/tests/ef_mime.c b/legacy/efreet/src/tests/ef_mime.c index 9c49eedfcc..89ace2b9e0 100644 --- a/legacy/efreet/src/tests/ef_mime.c +++ b/legacy/efreet/src/tests/ef_mime.c | |||
@@ -30,7 +30,7 @@ ef_mime_cb_get(void) | |||
30 | return 1; | 30 | return 1; |
31 | } | 31 | } |
32 | 32 | ||
33 | for (i = 0; files[i].file != NULL; ++i) | 33 | for (i = 0; files[i].file; ++i) |
34 | { | 34 | { |
35 | mime = efreet_mime_type_get(files[i].file); | 35 | mime = efreet_mime_type_get(files[i].file); |
36 | if (!mime) | 36 | if (!mime) |
diff --git a/legacy/efreet/src/tests/efreet_suite.c b/legacy/efreet/src/tests/efreet_suite.c index 801a41376a..7424435b5f 100644 --- a/legacy/efreet/src/tests/efreet_suite.c +++ b/legacy/efreet/src/tests/efreet_suite.c | |||
@@ -30,7 +30,7 @@ _list_tests(void) | |||
30 | 30 | ||
31 | itr = etc; | 31 | itr = etc; |
32 | fputs("Available Test Cases:\n", stderr); | 32 | fputs("Available Test Cases:\n", stderr); |
33 | for (; itr->test_case != NULL; itr++) | 33 | for (; itr->test_case; itr++) |
34 | fprintf(stderr, "\t%s\n", itr->test_case); | 34 | fprintf(stderr, "\t%s\n", itr->test_case); |
35 | } | 35 | } |
36 | 36 | ||
@@ -55,7 +55,7 @@ efreet_suite_build(int argc, const char **argv) | |||
55 | 55 | ||
56 | s = suite_create("Efreet"); | 56 | s = suite_create("Efreet"); |
57 | 57 | ||
58 | for (i = 0; etc[i].test_case != NULL; ++i) | 58 | for (i = 0; etc[i].test_case; ++i) |
59 | { | 59 | { |
60 | if (!_use_test(argc, argv, etc[i].test_case)) continue; | 60 | if (!_use_test(argc, argv, etc[i].test_case)) continue; |
61 | tc = tcase_create(etc[i].test_case); | 61 | tc = tcase_create(etc[i].test_case); |
diff --git a/legacy/efreet/src/tests/main.c b/legacy/efreet/src/tests/main.c index 3298e6b9db..147bf8cbff 100644 --- a/legacy/efreet/src/tests/main.c +++ b/legacy/efreet/src/tests/main.c | |||
@@ -124,7 +124,7 @@ main(int argc, char ** argv) | |||
124 | if ((!strcmp(argv[i], "-h")) || | 124 | if ((!strcmp(argv[i], "-h")) || |
125 | (!strcmp(argv[i], "--help"))) | 125 | (!strcmp(argv[i], "--help"))) |
126 | { | 126 | { |
127 | for (i = 0; tests[i].name != NULL; i++) | 127 | for (i = 0; tests[i].name; i++) |
128 | { | 128 | { |
129 | printf("%s\n", tests[i].name); | 129 | printf("%s\n", tests[i].name); |
130 | } | 130 | } |
@@ -135,7 +135,7 @@ main(int argc, char ** argv) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | environment_store(); | 137 | environment_store(); |
138 | for (i = 0; tests[i].name != NULL; i++) | 138 | for (i = 0; tests[i].name; i++) |
139 | { | 139 | { |
140 | int ret; | 140 | int ret; |
141 | double start; | 141 | double start; |
diff --git a/legacy/eina/src/include/eina_safety_checks.h b/legacy/eina/src/include/eina_safety_checks.h index 79ebc54fd3..29ebba07d3 100644 --- a/legacy/eina/src/include/eina_safety_checks.h +++ b/legacy/eina/src/include/eina_safety_checks.h | |||
@@ -196,10 +196,10 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED; | |||
196 | #else /* no safety checks */ | 196 | #else /* no safety checks */ |
197 | 197 | ||
198 | #define EINA_SAFETY_ON_NULL_RETURN(exp) \ | 198 | #define EINA_SAFETY_ON_NULL_RETURN(exp) \ |
199 | do { (void)((exp) == NULL); } while (0) | 199 | do { (void)(!(exp)); } while (0) |
200 | 200 | ||
201 | #define EINA_SAFETY_ON_NULL_RETURN_VAL(exp, val) \ | 201 | #define EINA_SAFETY_ON_NULL_RETURN_VAL(exp, val) \ |
202 | do { if (0 && (exp) == NULL) { (void)val; } } while (0) | 202 | do { if (0 && !(exp)) { (void)val; } } while (0) |
203 | 203 | ||
204 | #define EINA_SAFETY_ON_NULL_GOTO(exp, label) \ | 204 | #define EINA_SAFETY_ON_NULL_GOTO(exp, label) \ |
205 | do { if (0 && (exp) == NULL) { goto label; } } while (0) | 205 | do { if (0 && (exp) == NULL) { goto label; } } while (0) |
diff --git a/legacy/eina/src/lib/eina_file.c b/legacy/eina/src/lib/eina_file.c index 0e3a3dfae7..8c75c4c21e 100644 --- a/legacy/eina/src/lib/eina_file.c +++ b/legacy/eina/src/lib/eina_file.c | |||
@@ -375,7 +375,7 @@ eina_file_split(char *path) | |||
375 | return NULL; | 375 | return NULL; |
376 | 376 | ||
377 | for (current = strchr(path, PATH_DELIM); | 377 | for (current = strchr(path, PATH_DELIM); |
378 | current != NULL; | 378 | current; |
379 | path = current + 1, current = strchr(path, PATH_DELIM)) | 379 | path = current + 1, current = strchr(path, PATH_DELIM)) |
380 | { | 380 | { |
381 | length = current - path; | 381 | length = current - path; |
diff --git a/legacy/eina/src/lib/eina_hash.c b/legacy/eina/src/lib/eina_hash.c index 076a4075d5..0d95e42a60 100644 --- a/legacy/eina/src/lib/eina_hash.c +++ b/legacy/eina/src/lib/eina_hash.c | |||
@@ -603,7 +603,7 @@ _eina_hash_iterator_next(Eina_Iterator_Hash *it, void **data) | |||
603 | if (!(it->index < it->hash->population)) | 603 | if (!(it->index < it->hash->population)) |
604 | return EINA_FALSE; | 604 | return EINA_FALSE; |
605 | 605 | ||
606 | if (it->current == NULL) | 606 | if (!it->current) |
607 | { | 607 | { |
608 | ok = EINA_FALSE; | 608 | ok = EINA_FALSE; |
609 | bucket = 0; | 609 | bucket = 0; |
@@ -638,7 +638,7 @@ _eina_hash_iterator_next(Eina_Iterator_Hash *it, void **data) | |||
638 | { | 638 | { |
639 | while (bucket < it->hash->size) | 639 | while (bucket < it->hash->size) |
640 | { | 640 | { |
641 | if (it->hash->buckets[bucket] != NULL) | 641 | if (it->hash->buckets[bucket]) |
642 | { | 642 | { |
643 | it->current = | 643 | it->current = |
644 | eina_rbtree_iterator_prefix(it->hash->buckets[bucket]); | 644 | eina_rbtree_iterator_prefix(it->hash->buckets[bucket]); |
diff --git a/legacy/eina/src/lib/eina_inlist.c b/legacy/eina/src/lib/eina_inlist.c index 82873b763e..c7403a37c5 100644 --- a/legacy/eina/src/lib/eina_inlist.c +++ b/legacy/eina/src/lib/eina_inlist.c | |||
@@ -63,7 +63,7 @@ struct _Eina_Accessor_Inlist | |||
63 | 63 | ||
64 | static Eina_Bool | 64 | static Eina_Bool |
65 | eina_inlist_iterator_next(Eina_Iterator_Inlist *it, void **data) { | 65 | eina_inlist_iterator_next(Eina_Iterator_Inlist *it, void **data) { |
66 | if (it->current == NULL) | 66 | if (!it->current) |
67 | return EINA_FALSE; | 67 | return EINA_FALSE; |
68 | 68 | ||
69 | if (data) | 69 | if (data) |
@@ -97,7 +97,7 @@ eina_inlist_accessor_get_at(Eina_Accessor_Inlist *it, | |||
97 | else if (idx > it->index) | 97 | else if (idx > it->index) |
98 | /* Looking after current. */ | 98 | /* Looking after current. */ |
99 | for (i = it->index, over = it->current; | 99 | for (i = it->index, over = it->current; |
100 | i < idx && over != NULL; | 100 | i < idx && over; |
101 | ++i, over = over->next) | 101 | ++i, over = over->next) |
102 | ; | 102 | ; |
103 | else | 103 | else |
@@ -107,18 +107,18 @@ eina_inlist_accessor_get_at(Eina_Accessor_Inlist *it, | |||
107 | if (idx > middle) | 107 | if (idx > middle) |
108 | /* Looking backward from current. */ | 108 | /* Looking backward from current. */ |
109 | for (i = it->index, over = it->current; | 109 | for (i = it->index, over = it->current; |
110 | i > idx && over != NULL; | 110 | i > idx && over; |
111 | --i, over = over->prev) | 111 | --i, over = over->prev) |
112 | ; | 112 | ; |
113 | else | 113 | else |
114 | /* Looking from the start. */ | 114 | /* Looking from the start. */ |
115 | for (i = 0, over = it->head; | 115 | for (i = 0, over = it->head; |
116 | i < idx && over != NULL; | 116 | i < idx && over; |
117 | ++i, over = over->next) | 117 | ++i, over = over->next) |
118 | ; | 118 | ; |
119 | } | 119 | } |
120 | 120 | ||
121 | if (over == NULL) | 121 | if (!over) |
122 | return EINA_FALSE; | 122 | return EINA_FALSE; |
123 | 123 | ||
124 | it->current = over; | 124 | it->current = over; |
@@ -437,7 +437,7 @@ eina_inlist_remove(Eina_Inlist *list, Eina_Inlist *item) | |||
437 | EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL); | 437 | EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL); |
438 | EINA_SAFETY_ON_NULL_RETURN_VAL(item, list); | 438 | EINA_SAFETY_ON_NULL_RETURN_VAL(item, list); |
439 | EINA_SAFETY_ON_TRUE_RETURN_VAL | 439 | EINA_SAFETY_ON_TRUE_RETURN_VAL |
440 | ((item != list) && (item->prev == NULL) && (item->next == NULL), list); | 440 | ((item != list) && (!item->prev) && (!item->next), list); |
441 | 441 | ||
442 | if (item->next) | 442 | if (item->next) |
443 | item->next->prev = item->prev; | 443 | item->next->prev = item->prev; |
diff --git a/legacy/eina/src/lib/eina_list.c b/legacy/eina/src/lib/eina_list.c index 2b140d23b3..1b05e4f05d 100644 --- a/legacy/eina/src/lib/eina_list.c +++ b/legacy/eina/src/lib/eina_list.c | |||
@@ -272,7 +272,7 @@ eina_list_iterator_next(Eina_Iterator_List *it, void **data) | |||
272 | { | 272 | { |
273 | EINA_MAGIC_CHECK_LIST_ITERATOR(it, EINA_FALSE); | 273 | EINA_MAGIC_CHECK_LIST_ITERATOR(it, EINA_FALSE); |
274 | 274 | ||
275 | if (it->current == NULL) | 275 | if (!it->current) |
276 | return EINA_FALSE; | 276 | return EINA_FALSE; |
277 | 277 | ||
278 | *data = eina_list_data_get(it->current); | 278 | *data = eina_list_data_get(it->current); |
@@ -287,7 +287,7 @@ eina_list_iterator_prev(Eina_Iterator_List *it, void **data) | |||
287 | { | 287 | { |
288 | EINA_MAGIC_CHECK_LIST_ITERATOR(it, EINA_FALSE); | 288 | EINA_MAGIC_CHECK_LIST_ITERATOR(it, EINA_FALSE); |
289 | 289 | ||
290 | if (it->current == NULL) | 290 | if (!it->current) |
291 | return EINA_FALSE; | 291 | return EINA_FALSE; |
292 | 292 | ||
293 | *data = eina_list_data_get(it->current); | 293 | *data = eina_list_data_get(it->current); |
@@ -336,13 +336,13 @@ eina_list_accessor_get_at(Eina_Accessor_List *it, unsigned int idx, void **data) | |||
336 | /* Go backward from the end. */ | 336 | /* Go backward from the end. */ |
337 | for (i = eina_list_count(it->head) - 1, | 337 | for (i = eina_list_count(it->head) - 1, |
338 | over = eina_list_last(it->head); | 338 | over = eina_list_last(it->head); |
339 | i > idx && over != NULL; | 339 | i > idx && over; |
340 | --i, over = eina_list_prev(over)) | 340 | --i, over = eina_list_prev(over)) |
341 | ; | 341 | ; |
342 | else | 342 | else |
343 | /* Go forward from current. */ | 343 | /* Go forward from current. */ |
344 | for (i = it->index, over = it->current; | 344 | for (i = it->index, over = it->current; |
345 | i < idx && over != NULL; | 345 | i < idx && over; |
346 | ++i, over = eina_list_next(over)) | 346 | ++i, over = eina_list_next(over)) |
347 | ; | 347 | ; |
348 | } | 348 | } |
@@ -354,18 +354,18 @@ eina_list_accessor_get_at(Eina_Accessor_List *it, unsigned int idx, void **data) | |||
354 | if (idx > middle) | 354 | if (idx > middle) |
355 | /* Go backward from current. */ | 355 | /* Go backward from current. */ |
356 | for (i = it->index, over = it->current; | 356 | for (i = it->index, over = it->current; |
357 | i > idx && over != NULL; | 357 | i > idx && over; |
358 | --i, over = eina_list_prev(over)) | 358 | --i, over = eina_list_prev(over)) |
359 | ; | 359 | ; |
360 | else | 360 | else |
361 | /* Go forward from start. */ | 361 | /* Go forward from start. */ |
362 | for (i = 0, over = it->head; | 362 | for (i = 0, over = it->head; |
363 | i < idx && over != NULL; | 363 | i < idx && over; |
364 | ++i, over = eina_list_next(over)) | 364 | ++i, over = eina_list_next(over)) |
365 | ; | 365 | ; |
366 | } | 366 | } |
367 | 367 | ||
368 | if (over == NULL) | 368 | if (!over) |
369 | return EINA_FALSE; | 369 | return EINA_FALSE; |
370 | 370 | ||
371 | it->current = over; | 371 | it->current = over; |
diff --git a/legacy/eina/src/lib/eina_log.c b/legacy/eina/src/lib/eina_log.c index f8af3b9aa7..97d652bc6c 100644 --- a/legacy/eina/src/lib/eina_log.c +++ b/legacy/eina/src/lib/eina_log.c | |||
@@ -2373,19 +2373,19 @@ eina_log_print(int domain, Eina_Log_Level level, const char *file, | |||
2373 | va_list args; | 2373 | va_list args; |
2374 | 2374 | ||
2375 | #ifdef EINA_SAFETY_CHECKS | 2375 | #ifdef EINA_SAFETY_CHECKS |
2376 | if (EINA_UNLIKELY(file == NULL)) | 2376 | if (EINA_UNLIKELY(!file)) |
2377 | { | 2377 | { |
2378 | fputs("ERR: eina_log_print() file == NULL\n", stderr); | 2378 | fputs("ERR: eina_log_print() file == NULL\n", stderr); |
2379 | return; | 2379 | return; |
2380 | } | 2380 | } |
2381 | 2381 | ||
2382 | if (EINA_UNLIKELY(fnc == NULL)) | 2382 | if (EINA_UNLIKELY(!fnc)) |
2383 | { | 2383 | { |
2384 | fputs("ERR: eina_log_print() fnc == NULL\n", stderr); | 2384 | fputs("ERR: eina_log_print() fnc == NULL\n", stderr); |
2385 | return; | 2385 | return; |
2386 | } | 2386 | } |
2387 | 2387 | ||
2388 | if (EINA_UNLIKELY(fmt == NULL)) | 2388 | if (EINA_UNLIKELY(!fmt)) |
2389 | { | 2389 | { |
2390 | fputs("ERR: eina_log_print() fmt == NULL\n", stderr); | 2390 | fputs("ERR: eina_log_print() fmt == NULL\n", stderr); |
2391 | return; | 2391 | return; |
@@ -2428,19 +2428,19 @@ eina_log_vprint(int domain, Eina_Log_Level level, const char *file, | |||
2428 | const char *fnc, int line, const char *fmt, va_list args) | 2428 | const char *fnc, int line, const char *fmt, va_list args) |
2429 | { | 2429 | { |
2430 | #ifdef EINA_SAFETY_CHECKS | 2430 | #ifdef EINA_SAFETY_CHECKS |
2431 | if (EINA_UNLIKELY(file == NULL)) | 2431 | if (EINA_UNLIKELY(!file)) |
2432 | { | 2432 | { |
2433 | fputs("ERR: eina_log_print() file == NULL\n", stderr); | 2433 | fputs("ERR: eina_log_print() file == NULL\n", stderr); |
2434 | return; | 2434 | return; |
2435 | } | 2435 | } |
2436 | 2436 | ||
2437 | if (EINA_UNLIKELY(fnc == NULL)) | 2437 | if (EINA_UNLIKELY(!fnc)) |
2438 | { | 2438 | { |
2439 | fputs("ERR: eina_log_print() fnc == NULL\n", stderr); | 2439 | fputs("ERR: eina_log_print() fnc == NULL\n", stderr); |
2440 | return; | 2440 | return; |
2441 | } | 2441 | } |
2442 | 2442 | ||
2443 | if (EINA_UNLIKELY(fmt == NULL)) | 2443 | if (EINA_UNLIKELY(!fmt)) |
2444 | { | 2444 | { |
2445 | fputs("ERR: eina_log_print() fmt == NULL\n", stderr); | 2445 | fputs("ERR: eina_log_print() fmt == NULL\n", stderr); |
2446 | return; | 2446 | return; |
diff --git a/legacy/eina/src/lib/eina_matrixsparse.c b/legacy/eina/src/lib/eina_matrixsparse.c index 4857a5358a..a12c74aab8 100644 --- a/legacy/eina/src/lib/eina_matrixsparse.c +++ b/legacy/eina/src/lib/eina_matrixsparse.c | |||
@@ -429,7 +429,7 @@ _eina_matrixsparse_row_idx_get(const Eina_Matrixsparse *m, unsigned long row) | |||
429 | assert(dir != 0); | 429 | assert(dir != 0); |
430 | if (dir > 0) | 430 | if (dir > 0) |
431 | { | 431 | { |
432 | for (; r != NULL; r = r->next) | 432 | for (; r; r = r->next) |
433 | if (r->row == row) | 433 | if (r->row == row) |
434 | { | 434 | { |
435 | ((Eina_Matrixsparse *)m)->last_used = r; | 435 | ((Eina_Matrixsparse *)m)->last_used = r; |
@@ -440,7 +440,7 @@ _eina_matrixsparse_row_idx_get(const Eina_Matrixsparse *m, unsigned long row) | |||
440 | 440 | ||
441 | } | 441 | } |
442 | else if (dir < 0) | 442 | else if (dir < 0) |
443 | for (; r != NULL; r = r->prev) | 443 | for (; r; r = r->prev) |
444 | if (r->row == row) | 444 | if (r->row == row) |
445 | { | 445 | { |
446 | ((Eina_Matrixsparse *)m)->last_used = r; | 446 | ((Eina_Matrixsparse *)m)->last_used = r; |
@@ -479,7 +479,7 @@ _eina_matrixsparse_row_cell_idx_get(const Eina_Matrixsparse_Row *r, | |||
479 | assert(dir != 0); | 479 | assert(dir != 0); |
480 | if (dir > 0) | 480 | if (dir > 0) |
481 | { | 481 | { |
482 | for (; r != NULL; c = c->next) | 482 | for (; r; c = c->next) |
483 | if (c->col == col) | 483 | if (c->col == col) |
484 | { | 484 | { |
485 | ((Eina_Matrixsparse_Row *)r)->last_used = c; | 485 | ((Eina_Matrixsparse_Row *)r)->last_used = c; |
@@ -490,7 +490,7 @@ _eina_matrixsparse_row_cell_idx_get(const Eina_Matrixsparse_Row *r, | |||
490 | 490 | ||
491 | } | 491 | } |
492 | else if (dir < 0) | 492 | else if (dir < 0) |
493 | for (; r != NULL; c = c->prev) | 493 | for (; r; c = c->prev) |
494 | if (c->col == col) | 494 | if (c->col == col) |
495 | { | 495 | { |
496 | ((Eina_Matrixsparse_Row *)r)->last_used = c; | 496 | ((Eina_Matrixsparse_Row *)r)->last_used = c; |
@@ -527,21 +527,21 @@ _eina_matrixsparse_row_idx_siblings_find(const Eina_Matrixsparse *m, | |||
527 | assert(dir != 0); | 527 | assert(dir != 0); |
528 | if (dir > 0) | 528 | if (dir > 0) |
529 | { | 529 | { |
530 | for (; r != NULL; r = r->next) | 530 | for (; r; r = r->next) |
531 | if (r->row > row) | 531 | if (r->row > row) |
532 | break; | 532 | break; |
533 | 533 | ||
534 | assert(r != NULL); | 534 | assert(!!r); |
535 | *p_prev = r->prev; | 535 | *p_prev = r->prev; |
536 | *p_next = r; | 536 | *p_next = r; |
537 | } | 537 | } |
538 | else if (dir < 0) | 538 | else if (dir < 0) |
539 | { | 539 | { |
540 | for (; r != NULL; r = r->prev) | 540 | for (; r; r = r->prev) |
541 | if (r->row < row) | 541 | if (r->row < row) |
542 | break; | 542 | break; |
543 | 543 | ||
544 | assert(r != NULL); | 544 | assert(!!r); |
545 | *p_prev = r; | 545 | *p_prev = r; |
546 | *p_next = r->next; | 546 | *p_next = r->next; |
547 | } | 547 | } |
@@ -560,21 +560,21 @@ _eina_matrixsparse_row_cell_idx_siblings_find(const Eina_Matrixsparse_Row *r, | |||
560 | assert(dir != 0); | 560 | assert(dir != 0); |
561 | if (dir > 0) | 561 | if (dir > 0) |
562 | { | 562 | { |
563 | for (; c != NULL; c = c->next) | 563 | for (; c; c = c->next) |
564 | if (c->col > col) | 564 | if (c->col > col) |
565 | break; | 565 | break; |
566 | 566 | ||
567 | assert(c != NULL); | 567 | assert(!!c); |
568 | *p_prev = c->prev; | 568 | *p_prev = c->prev; |
569 | *p_next = c; | 569 | *p_next = c; |
570 | } | 570 | } |
571 | else if (dir < 0) | 571 | else if (dir < 0) |
572 | { | 572 | { |
573 | for (; c != NULL; c = c->prev) | 573 | for (; c; c = c->prev) |
574 | if (c->col < col) | 574 | if (c->col < col) |
575 | break; | 575 | break; |
576 | 576 | ||
577 | assert(c != NULL); | 577 | assert(!!c); |
578 | *p_prev = c; | 578 | *p_prev = c; |
579 | *p_next = c->next; | 579 | *p_next = c->next; |
580 | } | 580 | } |
@@ -613,8 +613,8 @@ _eina_matrixsparse_row_idx_add(Eina_Matrixsparse *m, unsigned long row) | |||
613 | { | 613 | { |
614 | Eina_Matrixsparse_Row *prev = NULL, *next = NULL; | 614 | Eina_Matrixsparse_Row *prev = NULL, *next = NULL; |
615 | _eina_matrixsparse_row_idx_siblings_find(m, row, &prev, &next); | 615 | _eina_matrixsparse_row_idx_siblings_find(m, row, &prev, &next); |
616 | assert(prev != NULL); | 616 | assert(!!prev); |
617 | assert(next != NULL); | 617 | assert(!!next); |
618 | r->prev = prev; | 618 | r->prev = prev; |
619 | r->next = next; | 619 | r->next = next; |
620 | prev->next = r; | 620 | prev->next = r; |
@@ -666,8 +666,8 @@ _eina_matrixsparse_row_cell_idx_add(Eina_Matrixsparse_Row *r, | |||
666 | { | 666 | { |
667 | Eina_Matrixsparse_Cell *prev = NULL, *next = NULL; | 667 | Eina_Matrixsparse_Cell *prev = NULL, *next = NULL; |
668 | _eina_matrixsparse_row_cell_idx_siblings_find(r, col, &prev, &next); | 668 | _eina_matrixsparse_row_cell_idx_siblings_find(r, col, &prev, &next); |
669 | assert(prev != NULL); | 669 | assert(!!prev); |
670 | assert(next != NULL); | 670 | assert(!!next); |
671 | c->prev = prev; | 671 | c->prev = prev; |
672 | c->next = next; | 672 | c->next = next; |
673 | prev->next = c; | 673 | prev->next = c; |
@@ -758,7 +758,7 @@ _eina_matrixsparse_iterator_complete_next( | |||
758 | if (it->idx.row >= it->m->size.rows) | 758 | if (it->idx.row >= it->m->size.rows) |
759 | return 0; | 759 | return 0; |
760 | 760 | ||
761 | if (it->dummy.col.data != NULL) | 761 | if (it->dummy.col.data) |
762 | ERR("Last iterator call changed dummy cell!"); | 762 | ERR("Last iterator call changed dummy cell!"); |
763 | 763 | ||
764 | if ((it->ref.col) && | 764 | if ((it->ref.col) && |
@@ -806,7 +806,7 @@ _eina_matrixsparse_iterator_complete_free( | |||
806 | { | 806 | { |
807 | EINA_MAGIC_CHECK_MATRIXSPARSE_ITERATOR(it); | 807 | EINA_MAGIC_CHECK_MATRIXSPARSE_ITERATOR(it); |
808 | 808 | ||
809 | if (it->dummy.col.data != NULL) | 809 | if (it->dummy.col.data) |
810 | ERR("Last iterator call changed dummy cell!"); | 810 | ERR("Last iterator call changed dummy cell!"); |
811 | 811 | ||
812 | EINA_MAGIC_SET(it, EINA_MAGIC_NONE); | 812 | EINA_MAGIC_SET(it, EINA_MAGIC_NONE); |
@@ -1478,7 +1478,7 @@ eina_matrixsparse_column_idx_clear(Eina_Matrixsparse *m, unsigned long col) | |||
1478 | free_func = m->free.func; | 1478 | free_func = m->free.func; |
1479 | user_data = m->free.user_data; | 1479 | user_data = m->free.user_data; |
1480 | 1480 | ||
1481 | for (r = m->rows; r != NULL; ) | 1481 | for (r = m->rows; r; ) |
1482 | { | 1482 | { |
1483 | Eina_Matrixsparse_Row *r_aux = r; | 1483 | Eina_Matrixsparse_Row *r_aux = r; |
1484 | Eina_Matrixsparse_Cell *c; | 1484 | Eina_Matrixsparse_Cell *c; |
diff --git a/legacy/eina/src/lib/eina_rbtree.c b/legacy/eina/src/lib/eina_rbtree.c index 6d4130bab9..7e69d2c4b7 100644 --- a/legacy/eina/src/lib/eina_rbtree.c +++ b/legacy/eina/src/lib/eina_rbtree.c | |||
@@ -116,11 +116,11 @@ _eina_rbtree_iterator_next(Eina_Iterator_Rbtree *it, void **data) | |||
116 | last = eina_array_data_get(it->stack, eina_array_count_get(it->stack) - 1); | 116 | last = eina_array_data_get(it->stack, eina_array_count_get(it->stack) - 1); |
117 | tree = last->tree; | 117 | tree = last->tree; |
118 | 118 | ||
119 | if (last->tree == NULL || last->up == EINA_TRUE) | 119 | if (!last->tree || last->up == EINA_TRUE) |
120 | { | 120 | { |
121 | last = eina_array_pop(it->stack); | 121 | last = eina_array_pop(it->stack); |
122 | while (last->dir == EINA_RBTREE_LEFT | 122 | while (last->dir == EINA_RBTREE_LEFT |
123 | || last->tree == NULL) | 123 | || !last->tree) |
124 | { | 124 | { |
125 | if (tree) | 125 | if (tree) |
126 | if ((it->mask & EINA_RBTREE_ITERATOR_POSTFIX_MASK) == | 126 | if ((it->mask & EINA_RBTREE_ITERATOR_POSTFIX_MASK) == |
@@ -242,7 +242,7 @@ _eina_rbtree_node_init(Eina_Rbtree *node) | |||
242 | static inline Eina_Bool | 242 | static inline Eina_Bool |
243 | _eina_rbtree_is_red(Eina_Rbtree *node) | 243 | _eina_rbtree_is_red(Eina_Rbtree *node) |
244 | { | 244 | { |
245 | return node != NULL && node->color == EINA_RBTREE_RED; | 245 | return !!node && node->color == EINA_RBTREE_RED; |
246 | } | 246 | } |
247 | 247 | ||
248 | static inline Eina_Rbtree * | 248 | static inline Eina_Rbtree * |
@@ -317,7 +317,7 @@ eina_rbtree_inline_insert(Eina_Rbtree *root, | |||
317 | /* Search down the tree */ | 317 | /* Search down the tree */ |
318 | for (;; ) | 318 | for (;; ) |
319 | { | 319 | { |
320 | if (q == NULL) | 320 | if (!q) |
321 | /* Insert new node at the bottom */ | 321 | /* Insert new node at the bottom */ |
322 | p->son[dir] = q = node; | 322 | p->son[dir] = q = node; |
323 | else if (_eina_rbtree_is_red(q->son[0]) | 323 | else if (_eina_rbtree_is_red(q->son[0]) |
@@ -350,7 +350,7 @@ eina_rbtree_inline_insert(Eina_Rbtree *root, | |||
350 | dir = cmp(q, node, (void *)data); | 350 | dir = cmp(q, node, (void *)data); |
351 | 351 | ||
352 | /* Update helpers */ | 352 | /* Update helpers */ |
353 | if ( g != NULL ) | 353 | if ( g ) |
354 | t = g; | 354 | t = g; |
355 | 355 | ||
356 | g = p, p = q; | 356 | g = p, p = q; |
@@ -391,7 +391,7 @@ eina_rbtree_inline_remove(Eina_Rbtree *root, | |||
391 | q->son[EINA_RBTREE_RIGHT] = root; | 391 | q->son[EINA_RBTREE_RIGHT] = root; |
392 | 392 | ||
393 | /* Search and push a red down */ | 393 | /* Search and push a red down */ |
394 | while (q->son[dir] != NULL) | 394 | while (q->son[dir]) |
395 | { | 395 | { |
396 | Eina_Rbtree_Direction last = dir; | 396 | Eina_Rbtree_Direction last = dir; |
397 | Eina_Rbtree *g; | 397 | Eina_Rbtree *g; |
@@ -415,7 +415,7 @@ eina_rbtree_inline_remove(Eina_Rbtree *root, | |||
415 | { | 415 | { |
416 | Eina_Rbtree *s = p->son[!last]; | 416 | Eina_Rbtree *s = p->son[!last]; |
417 | 417 | ||
418 | if (s != NULL) | 418 | if (s) |
419 | { | 419 | { |
420 | if (!_eina_rbtree_is_red(s->son[EINA_RBTREE_LEFT]) | 420 | if (!_eina_rbtree_is_red(s->son[EINA_RBTREE_LEFT]) |
421 | && !_eina_rbtree_is_red(s->son[EINA_RBTREE_RIGHT])) | 421 | && !_eina_rbtree_is_red(s->son[EINA_RBTREE_RIGHT])) |
@@ -466,13 +466,13 @@ eina_rbtree_inline_remove(Eina_Rbtree *root, | |||
466 | } | 466 | } |
467 | 467 | ||
468 | /* Replace and remove if found */ | 468 | /* Replace and remove if found */ |
469 | if (f != NULL) | 469 | if (f) |
470 | { | 470 | { |
471 | /* 'q' should take the place of 'node' parent */ | 471 | /* 'q' should take the place of 'node' parent */ |
472 | f->son[f->son[1] == node] = q; | 472 | f->son[f->son[1] == node] = q; |
473 | 473 | ||
474 | /* Switch the link from the parent to q's son */ | 474 | /* Switch the link from the parent to q's son */ |
475 | p->son[p->son[1] == q] = q->son[q->son[0] == NULL]; | 475 | p->son[p->son[1] == q] = q->son[!q->son[0]]; |
476 | 476 | ||
477 | /* Put q at the place of node */ | 477 | /* Put q at the place of node */ |
478 | q->son[0] = node->son[0]; | 478 | q->son[0] = node->son[0]; |
@@ -485,7 +485,7 @@ eina_rbtree_inline_remove(Eina_Rbtree *root, | |||
485 | } | 485 | } |
486 | 486 | ||
487 | root = head.son[1]; | 487 | root = head.son[1]; |
488 | if (root != NULL) | 488 | if (root) |
489 | root->color = EINA_RBTREE_BLACK; | 489 | root->color = EINA_RBTREE_BLACK; |
490 | 490 | ||
491 | return root; | 491 | return root; |
diff --git a/legacy/eina/src/lib/eina_share_common.c b/legacy/eina/src/lib/eina_share_common.c index 876b1ee85e..dcc99c2810 100644 --- a/legacy/eina/src/lib/eina_share_common.c +++ b/legacy/eina/src/lib/eina_share_common.c | |||
@@ -492,7 +492,7 @@ _eina_share_common_head_find(Eina_Share_Common_Head *head, | |||
492 | 492 | ||
493 | prev = node; | 493 | prev = node; |
494 | node = node->next; | 494 | node = node->next; |
495 | for (; node != NULL; prev = node, node = node->next) | 495 | for (; node; prev = node, node = node->next) |
496 | if (_eina_share_common_node_eq(node, str, slen)) | 496 | if (_eina_share_common_node_eq(node, str, slen)) |
497 | { | 497 | { |
498 | /* promote node, make hot items be at the beginning */ | 498 | /* promote node, make hot items be at the beginning */ |
@@ -519,7 +519,7 @@ _eina_share_common_head_remove_node(Eina_Share_Common_Head *head, | |||
519 | 519 | ||
520 | prev = head->head; | 520 | prev = head->head; |
521 | cur = head->head->next; | 521 | cur = head->head->next; |
522 | for (; cur != NULL; prev = cur, cur = cur->next) | 522 | for (; cur; prev = cur, cur = cur->next) |
523 | if (cur == node) | 523 | if (cur == node) |
524 | { | 524 | { |
525 | prev->next = cur->next; | 525 | prev->next = cur->next; |
diff --git a/legacy/eina/src/lib/eina_tiler.c b/legacy/eina/src/lib/eina_tiler.c index 9d3f4cbc65..2d263b7a15 100644 --- a/legacy/eina/src/lib/eina_tiler.c +++ b/legacy/eina/src/lib/eina_tiler.c | |||
@@ -920,7 +920,7 @@ static void rect_list_merge_rects(list_t *rects, | |||
920 | merged = 0; | 920 | merged = 0; |
921 | parent_node = NULL; | 921 | parent_node = NULL; |
922 | node = rects->head; | 922 | node = rects->head; |
923 | while (node != NULL) | 923 | while (node) |
924 | { | 924 | { |
925 | rect_t r2, outer; | 925 | rect_t r2, outer; |
926 | int area; | 926 | int area; |
@@ -1067,7 +1067,7 @@ static Eina_Bool _iterator_next(Eina_Iterator_Tiler *it, void **data) | |||
1067 | Eina_Rectangle *rect = (Eina_Rectangle *)data; | 1067 | Eina_Rectangle *rect = (Eina_Rectangle *)data; |
1068 | list_node_t *n; | 1068 | list_node_t *n; |
1069 | 1069 | ||
1070 | for (n = it->curr; n != NULL; n = n->next) | 1070 | for (n = it->curr; n; n = n->next) |
1071 | { | 1071 | { |
1072 | rect_t cur; | 1072 | rect_t cur; |
1073 | 1073 | ||
diff --git a/legacy/eina/src/tests/ecore_list.c b/legacy/eina/src/tests/ecore_list.c index f6ac49c611..7da44178b0 100644 --- a/legacy/eina/src/tests/ecore_list.c +++ b/legacy/eina/src/tests/ecore_list.c | |||
@@ -240,7 +240,7 @@ _ecore_list_append_0(Ecore_List *list, Ecore_List_Node *end) | |||
240 | 240 | ||
241 | list->last = end; | 241 | list->last = end; |
242 | 242 | ||
243 | if (list->first == NULL) | 243 | if (!list->first) |
244 | { | 244 | { |
245 | list->first = end; | 245 | list->first = end; |
246 | list->index = 0; | 246 | list->index = 0; |
@@ -288,7 +288,7 @@ _ecore_list_prepend_0(Ecore_List *list, Ecore_List_Node *start) | |||
288 | list->first = start; | 288 | list->first = start; |
289 | 289 | ||
290 | /* If no last node, then the first node is the last node */ | 290 | /* If no last node, then the first node is the last node */ |
291 | if (list->last == NULL) | 291 | if (!list->last) |
292 | list->last = list->first; | 292 | list->last = list->first; |
293 | 293 | ||
294 | list->nodes++; | 294 | list->nodes++; |
@@ -331,7 +331,7 @@ _ecore_list_insert(Ecore_List *list, Ecore_List_Node *new_node) | |||
331 | if (list->current == list->first) | 331 | if (list->current == list->first) |
332 | return _ecore_list_prepend_0(list, new_node); | 332 | return _ecore_list_prepend_0(list, new_node); |
333 | 333 | ||
334 | if (list->current == NULL) | 334 | if (!list->current) |
335 | { | 335 | { |
336 | int ret_value; | 336 | int ret_value; |
337 | 337 | ||
@@ -942,7 +942,7 @@ _ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data) | |||
942 | return FALSE; | 942 | return FALSE; |
943 | 943 | ||
944 | _ecore_list_first_goto(list); | 944 | _ecore_list_first_goto(list); |
945 | while ((value = _ecore_list_next(list)) != NULL) | 945 | while ((value = _ecore_list_next(list))) |
946 | function(value, user_data); | 946 | function(value, user_data); |
947 | 947 | ||
948 | return TRUE; | 948 | return TRUE; |
@@ -976,7 +976,7 @@ _ecore_list_find(Ecore_List *list, | |||
976 | return NULL; | 976 | return NULL; |
977 | 977 | ||
978 | _ecore_list_first_goto(list); | 978 | _ecore_list_first_goto(list); |
979 | while ((value = _ecore_list_current(list)) != NULL) | 979 | while ((value = _ecore_list_current(list))) |
980 | { | 980 | { |
981 | if (!function(value, user_data)) | 981 | if (!function(value, user_data)) |
982 | return value; | 982 | return value; |
diff --git a/legacy/eina/src/tests/eina_bench.c b/legacy/eina/src/tests/eina_bench.c index e971873961..501532703c 100644 --- a/legacy/eina/src/tests/eina_bench.c +++ b/legacy/eina/src/tests/eina_bench.c | |||
@@ -83,7 +83,7 @@ main(int argc, char **argv) | |||
83 | 83 | ||
84 | eina_init(); | 84 | eina_init(); |
85 | 85 | ||
86 | for (i = 0; etc[i].bench_case != NULL; ++i) | 86 | for (i = 0; etc[i].bench_case; ++i) |
87 | { | 87 | { |
88 | test = eina_benchmark_new(etc[i].bench_case, argv[1]); | 88 | test = eina_benchmark_new(etc[i].bench_case, argv[1]); |
89 | if (!test) | 89 | if (!test) |
diff --git a/legacy/eina/src/tests/eina_suite.c b/legacy/eina/src/tests/eina_suite.c index 78a014f950..15d8ff8c4b 100644 --- a/legacy/eina/src/tests/eina_suite.c +++ b/legacy/eina/src/tests/eina_suite.c | |||
@@ -70,7 +70,7 @@ _list_tests(void) | |||
70 | { | 70 | { |
71 | const Eina_Test_Case *itr = etc; | 71 | const Eina_Test_Case *itr = etc; |
72 | fputs("Available Test Cases:\n", stderr); | 72 | fputs("Available Test Cases:\n", stderr); |
73 | for (; itr->test_case != NULL; itr++) | 73 | for (; itr->test_case; itr++) |
74 | fprintf(stderr, "\t%s\n", itr->test_case); | 74 | fprintf(stderr, "\t%s\n", itr->test_case); |
75 | } | 75 | } |
76 | 76 | ||
@@ -96,7 +96,7 @@ eina_build_suite(int argc, const char **argv) | |||
96 | 96 | ||
97 | s = suite_create("Eina"); | 97 | s = suite_create("Eina"); |
98 | 98 | ||
99 | for (i = 0; etc[i].test_case != NULL; ++i) | 99 | for (i = 0; etc[i].test_case; ++i) |
100 | { | 100 | { |
101 | if (!_use_test(argc, argv, etc[i].test_case)) | 101 | if (!_use_test(argc, argv, etc[i].test_case)) |
102 | continue; | 102 | continue; |
diff --git a/legacy/eina/src/tests/eina_test_binshare.c b/legacy/eina/src/tests/eina_test_binshare.c index b6c4c79396..8dab062e79 100644 --- a/legacy/eina/src/tests/eina_test_binshare.c +++ b/legacy/eina/src/tests/eina_test_binshare.c | |||
@@ -85,8 +85,8 @@ START_TEST(eina_binshare_small) | |||
85 | t0 = eina_binshare_add_length(buf, i); | 85 | t0 = eina_binshare_add_length(buf, i); |
86 | t1 = eina_binshare_add_length(buf, i); | 86 | t1 = eina_binshare_add_length(buf, i); |
87 | 87 | ||
88 | fail_if(t0 == NULL); | 88 | fail_if(!t0); |
89 | fail_if(t1 == NULL); | 89 | fail_if(!t1); |
90 | fail_if(t0 != t1); | 90 | fail_if(t0 != t1); |
91 | fail_if(memcmp(t0, buf, i) != 0); | 91 | fail_if(memcmp(t0, buf, i) != 0); |
92 | 92 | ||
@@ -110,8 +110,8 @@ START_TEST(eina_binshare_test_share) | |||
110 | t0 = eina_binshare_add_length(TEST0, TEST0_SIZE); | 110 | t0 = eina_binshare_add_length(TEST0, TEST0_SIZE); |
111 | t1 = eina_binshare_add_length(TEST0, TEST0_SIZE); | 111 | t1 = eina_binshare_add_length(TEST0, TEST0_SIZE); |
112 | 112 | ||
113 | fail_if(t0 == NULL); | 113 | fail_if(!t0); |
114 | fail_if(t1 == NULL); | 114 | fail_if(!t1); |
115 | fail_if(memcmp(t0, TEST0, TEST0_SIZE) != 0); | 115 | fail_if(memcmp(t0, TEST0, TEST0_SIZE) != 0); |
116 | fail_if(memcmp(t1, TEST0, TEST0_SIZE) != 0); | 116 | fail_if(memcmp(t1, TEST0, TEST0_SIZE) != 0); |
117 | fail_if(t0 != t1); | 117 | fail_if(t0 != t1); |
@@ -168,7 +168,7 @@ START_TEST(eina_binshare_collision) | |||
168 | if (rand() > RAND_MAX / 2) | 168 | if (rand() > RAND_MAX / 2) |
169 | { | 169 | { |
170 | const char *r = eina_binshare_add_length(buffer, strlen(buffer)); | 170 | const char *r = eina_binshare_add_length(buffer, strlen(buffer)); |
171 | fail_if(r == NULL); | 171 | fail_if(!r); |
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
@@ -180,9 +180,9 @@ START_TEST(eina_binshare_collision) | |||
180 | eina_array_push(ea, | 180 | eina_array_push(ea, |
181 | (void *)eina_binshare_add_length(buffer, strlen(buffer))); | 181 | (void *)eina_binshare_add_length(buffer, strlen(buffer))); |
182 | r = eina_binshare_add_length(buffer, strlen(buffer)); | 182 | r = eina_binshare_add_length(buffer, strlen(buffer)); |
183 | fail_if(r == NULL); | 183 | fail_if(!r); |
184 | r = eina_binshare_add_length(buffer, strlen(buffer)); | 184 | r = eina_binshare_add_length(buffer, strlen(buffer)); |
185 | fail_if(r == NULL); | 185 | fail_if(!r); |
186 | } | 186 | } |
187 | 187 | ||
188 | for (i = 0; i < 200; ++i) | 188 | for (i = 0; i < 200; ++i) |
diff --git a/legacy/eina/src/tests/eina_test_hash.c b/legacy/eina/src/tests/eina_test_hash.c index aeeb655e7b..ac6ee76c6c 100644 --- a/legacy/eina/src/tests/eina_test_hash.c +++ b/legacy/eina/src/tests/eina_test_hash.c | |||
@@ -111,7 +111,7 @@ START_TEST(eina_hash_extended) | |||
111 | fail_if(eina_init() != 2); | 111 | fail_if(eina_init() != 2); |
112 | 112 | ||
113 | hash = eina_hash_string_djb2_new(NULL); | 113 | hash = eina_hash_string_djb2_new(NULL); |
114 | fail_if(hash == NULL); | 114 | fail_if(!hash); |
115 | 115 | ||
116 | fail_if(eina_hash_direct_add(hash, "42", "42") != EINA_TRUE); | 116 | fail_if(eina_hash_direct_add(hash, "42", "42") != EINA_TRUE); |
117 | 117 | ||
@@ -123,7 +123,7 @@ START_TEST(eina_hash_extended) | |||
123 | fail_if(eina_hash_direct_add(hash, tmp, tmp) != EINA_TRUE); | 123 | fail_if(eina_hash_direct_add(hash, tmp, tmp) != EINA_TRUE); |
124 | } | 124 | } |
125 | 125 | ||
126 | fail_if(eina_hash_find(hash, "42") == NULL); | 126 | fail_if(!eina_hash_find(hash, "42")); |
127 | 127 | ||
128 | eina_hash_free(hash); | 128 | eina_hash_free(hash); |
129 | 129 | ||
@@ -140,7 +140,7 @@ START_TEST(eina_hash_double_item) | |||
140 | fail_if(eina_init() != 2); | 140 | fail_if(eina_init() != 2); |
141 | 141 | ||
142 | hash = eina_hash_string_superfast_new(NULL); | 142 | hash = eina_hash_string_superfast_new(NULL); |
143 | fail_if(hash == NULL); | 143 | fail_if(!hash); |
144 | 144 | ||
145 | fail_if(eina_hash_add(hash, "7", &i[0]) != EINA_TRUE); | 145 | fail_if(eina_hash_add(hash, "7", &i[0]) != EINA_TRUE); |
146 | fail_if(eina_hash_add(hash, "7", &i[1]) != EINA_TRUE); | 146 | fail_if(eina_hash_add(hash, "7", &i[1]) != EINA_TRUE); |
@@ -167,7 +167,7 @@ START_TEST(eina_hash_all_int) | |||
167 | fail_if(eina_init() != 2); | 167 | fail_if(eina_init() != 2); |
168 | 168 | ||
169 | hash = eina_hash_int32_new(NULL); | 169 | hash = eina_hash_int32_new(NULL); |
170 | fail_if(hash == NULL); | 170 | fail_if(!hash); |
171 | 171 | ||
172 | for (it = 0; it < 4; ++it) | 172 | for (it = 0; it < 4; ++it) |
173 | fail_if(eina_hash_add(hash, &i[it], &i[it]) != EINA_TRUE); | 173 | fail_if(eina_hash_add(hash, &i[it], &i[it]) != EINA_TRUE); |
@@ -182,7 +182,7 @@ START_TEST(eina_hash_all_int) | |||
182 | eina_hash_free(hash); | 182 | eina_hash_free(hash); |
183 | 183 | ||
184 | hash = eina_hash_int64_new(NULL); | 184 | hash = eina_hash_int64_new(NULL); |
185 | fail_if(hash == NULL); | 185 | fail_if(!hash); |
186 | 186 | ||
187 | for (it = 0; it < 4; ++it) | 187 | for (it = 0; it < 4; ++it) |
188 | fail_if(eina_hash_add(hash, &j[it], &j[it]) != EINA_TRUE); | 188 | fail_if(eina_hash_add(hash, &j[it], &j[it]) != EINA_TRUE); |
diff --git a/legacy/eina/src/tests/eina_test_list.c b/legacy/eina/src/tests/eina_test_list.c index 6e088473d1..eef1965490 100644 --- a/legacy/eina/src/tests/eina_test_list.c +++ b/legacy/eina/src/tests/eina_test_list.c | |||
@@ -220,39 +220,39 @@ START_TEST(eina_test_merge) | |||
220 | l1 = eina_list_append(l1, &data[1]); | 220 | l1 = eina_list_append(l1, &data[1]); |
221 | l1 = eina_list_append(l1, &data[2]); | 221 | l1 = eina_list_append(l1, &data[2]); |
222 | l1 = eina_list_append(l1, &data[3]); | 222 | l1 = eina_list_append(l1, &data[3]); |
223 | fail_if(l1 == NULL); | 223 | fail_if(!l1); |
224 | 224 | ||
225 | l2 = eina_list_append(NULL, &data[4]); | 225 | l2 = eina_list_append(NULL, &data[4]); |
226 | l2 = eina_list_append(l2, &data[5]); | 226 | l2 = eina_list_append(l2, &data[5]); |
227 | fail_if(l2 == NULL); | 227 | fail_if(!l2); |
228 | 228 | ||
229 | l1 = eina_list_merge(l1, l2); | 229 | l1 = eina_list_merge(l1, l2); |
230 | fail_if(l1 == NULL); | 230 | fail_if(!l1); |
231 | fail_if(eina_list_count(l1) != 6); | 231 | fail_if(eina_list_count(l1) != 6); |
232 | for (i = 0, l2 = l1; ((l2 != NULL) && (i < 6)); ++i, l2 = l2->next) | 232 | for (i = 0, l2 = l1; ((l2) && (i < 6)); ++i, l2 = l2->next) |
233 | fail_if(l2->data != &data[i]); | 233 | fail_if(l2->data != &data[i]); |
234 | fail_if(i != 6); | 234 | fail_if(i != 6); |
235 | fail_if(l2 != NULL); | 235 | fail_if(!!l2); |
236 | 236 | ||
237 | eina_list_free(l1); | 237 | eina_list_free(l1); |
238 | 238 | ||
239 | l1 = eina_list_append(NULL, &data[0]); | 239 | l1 = eina_list_append(NULL, &data[0]); |
240 | l1 = eina_list_append(l1, &data[1]); | 240 | l1 = eina_list_append(l1, &data[1]); |
241 | fail_if(l1 == NULL); | 241 | fail_if(!l1); |
242 | 242 | ||
243 | l2 = eina_list_append(NULL, &data[2]); | 243 | l2 = eina_list_append(NULL, &data[2]); |
244 | l2 = eina_list_append(l2, &data[3]); | 244 | l2 = eina_list_append(l2, &data[3]); |
245 | l2 = eina_list_append(l2, &data[4]); | 245 | l2 = eina_list_append(l2, &data[4]); |
246 | l2 = eina_list_append(l2, &data[5]); | 246 | l2 = eina_list_append(l2, &data[5]); |
247 | fail_if(l2 == NULL); | 247 | fail_if(!l2); |
248 | 248 | ||
249 | l1 = eina_list_merge(l1, l2); | 249 | l1 = eina_list_merge(l1, l2); |
250 | fail_if(l1 == NULL); | 250 | fail_if(!l1); |
251 | fail_if(eina_list_count(l1) != 6); | 251 | fail_if(eina_list_count(l1) != 6); |
252 | for (i = 0, l2 = l1; ((l2 != NULL) && (i < 6)); ++i, l2 = l2->next) | 252 | for (i = 0, l2 = l1; ((l2) && (i < 6)); ++i, l2 = l2->next) |
253 | fail_if(l2->data != &data[i]); | 253 | fail_if(l2->data != &data[i]); |
254 | fail_if(i != 6); | 254 | fail_if(i != 6); |
255 | fail_if(l2 != NULL); | 255 | fail_if(!!l2); |
256 | 256 | ||
257 | l3 = eina_list_append(NULL, &data[6]); | 257 | l3 = eina_list_append(NULL, &data[6]); |
258 | l3 = eina_list_append(l3, &data[7]); | 258 | l3 = eina_list_append(l3, &data[7]); |
@@ -272,15 +272,15 @@ START_TEST(eina_test_merge) | |||
272 | l5 = eina_list_sort(l5, -1, eina_int_cmp); | 272 | l5 = eina_list_sort(l5, -1, eina_int_cmp); |
273 | 273 | ||
274 | l1 = eina_list_sorted_merge(l1, l3, eina_int_cmp); | 274 | l1 = eina_list_sorted_merge(l1, l3, eina_int_cmp); |
275 | fail_if(l1 == NULL); | 275 | fail_if(!l1); |
276 | fail_if(eina_list_count(l1) != 9); | 276 | fail_if(eina_list_count(l1) != 9); |
277 | 277 | ||
278 | l1 = eina_list_sorted_merge(l1, l4, eina_int_cmp); | 278 | l1 = eina_list_sorted_merge(l1, l4, eina_int_cmp); |
279 | fail_if(l1 == NULL); | 279 | fail_if(!l1); |
280 | fail_if(eina_list_count(l1) != 12); | 280 | fail_if(eina_list_count(l1) != 12); |
281 | 281 | ||
282 | l1 = eina_list_sorted_merge(l1, l5, eina_int_cmp); | 282 | l1 = eina_list_sorted_merge(l1, l5, eina_int_cmp); |
283 | fail_if(l1 == NULL); | 283 | fail_if(!l1); |
284 | fail_if(eina_list_count(l1) != 15); | 284 | fail_if(eina_list_count(l1) != 15); |
285 | 285 | ||
286 | fail_if(!eina_list_sorted_check(l1)); | 286 | fail_if(!eina_list_sorted_check(l1)); |
@@ -305,14 +305,14 @@ START_TEST(eina_test_sorted_insert) | |||
305 | for (i = 0; i < count; i++) | 305 | for (i = 0; i < count; i++) |
306 | l1 = eina_list_sorted_insert(l1, eina_int_cmp, data + i); | 306 | l1 = eina_list_sorted_insert(l1, eina_int_cmp, data + i); |
307 | 307 | ||
308 | fail_if(l1 == NULL); | 308 | fail_if(!l1); |
309 | fail_if(!eina_list_sorted_check(l1)); | 309 | fail_if(!eina_list_sorted_check(l1)); |
310 | 310 | ||
311 | l2 = NULL; | 311 | l2 = NULL; |
312 | EINA_LIST_FOREACH(l1, itr, d) | 312 | EINA_LIST_FOREACH(l1, itr, d) |
313 | l2 = eina_list_sorted_insert(l2, eina_int_cmp, d); | 313 | l2 = eina_list_sorted_insert(l2, eina_int_cmp, d); |
314 | 314 | ||
315 | fail_if(l2 == NULL); | 315 | fail_if(!l2); |
316 | fail_if(!eina_list_sorted_check(l2)); | 316 | fail_if(!eina_list_sorted_check(l2)); |
317 | eina_list_free(l2); | 317 | eina_list_free(l2); |
318 | 318 | ||
@@ -320,7 +320,7 @@ START_TEST(eina_test_sorted_insert) | |||
320 | EINA_LIST_REVERSE_FOREACH(l1, itr, d) | 320 | EINA_LIST_REVERSE_FOREACH(l1, itr, d) |
321 | l2 = eina_list_sorted_insert(l2, eina_int_cmp, d); | 321 | l2 = eina_list_sorted_insert(l2, eina_int_cmp, d); |
322 | 322 | ||
323 | fail_if(l2 == NULL); | 323 | fail_if(!l2); |
324 | fail_if(!eina_list_sorted_check(l2)); | 324 | fail_if(!eina_list_sorted_check(l2)); |
325 | eina_list_free(l2); | 325 | eina_list_free(l2); |
326 | eina_list_free(l1); | 326 | eina_list_free(l1); |
@@ -330,7 +330,7 @@ START_TEST(eina_test_sorted_insert) | |||
330 | for (i = 0; i < count; i++) | 330 | for (i = 0; i < count; i++) |
331 | l1 = eina_list_sorted_insert(l1, eina_int_cmp, data2 + i); | 331 | l1 = eina_list_sorted_insert(l1, eina_int_cmp, data2 + i); |
332 | 332 | ||
333 | fail_if(l1 == NULL); | 333 | fail_if(!l1); |
334 | fail_if(!eina_list_sorted_check(l1)); | 334 | fail_if(!eina_list_sorted_check(l1)); |
335 | eina_list_free(l1); | 335 | eina_list_free(l1); |
336 | 336 | ||
diff --git a/legacy/eina/src/tests/eina_test_matrixsparse.c b/legacy/eina/src/tests/eina_test_matrixsparse.c index e07b1eead7..3f529a8e96 100644 --- a/legacy/eina/src/tests/eina_test_matrixsparse.c +++ b/legacy/eina/src/tests/eina_test_matrixsparse.c | |||
@@ -286,7 +286,7 @@ START_TEST(eina_test_resize) | |||
286 | 286 | ||
287 | matrix = eina_matrixsparse_new(MAX_ROWS, MAX_COLS, | 287 | matrix = eina_matrixsparse_new(MAX_ROWS, MAX_COLS, |
288 | eina_matrixsparse_free_cell_cb, data); | 288 | eina_matrixsparse_free_cell_cb, data); |
289 | fail_if(matrix == NULL); | 289 | fail_if(!matrix); |
290 | 290 | ||
291 | /* cell insertion */ | 291 | /* cell insertion */ |
292 | data[0][5] = 5; | 292 | data[0][5] = 5; |
@@ -408,7 +408,7 @@ START_TEST(eina_test_iterators) | |||
408 | 408 | ||
409 | matrix = eina_matrixsparse_new(MAX_ROWS, MAX_COLS, | 409 | matrix = eina_matrixsparse_new(MAX_ROWS, MAX_COLS, |
410 | eina_matrixsparse_free_cell_cb, data); | 410 | eina_matrixsparse_free_cell_cb, data); |
411 | fail_if(matrix == NULL); | 411 | fail_if(!matrix); |
412 | 412 | ||
413 | r = eina_matrixsparse_data_idx_set(matrix, 3, 5, &data[3][5]); | 413 | r = eina_matrixsparse_data_idx_set(matrix, 3, 5, &data[3][5]); |
414 | fail_if(r == EINA_FALSE); | 414 | fail_if(r == EINA_FALSE); |
@@ -448,23 +448,23 @@ START_TEST(eina_test_iterators) | |||
448 | fail_if(r == EINA_FALSE); | 448 | fail_if(r == EINA_FALSE); |
449 | 449 | ||
450 | it = eina_matrixsparse_iterator_new(matrix); | 450 | it = eina_matrixsparse_iterator_new(matrix); |
451 | fail_if(it == NULL); | 451 | fail_if(!it); |
452 | EINA_ITERATOR_FOREACH(it, cell) | 452 | EINA_ITERATOR_FOREACH(it, cell) |
453 | { | 453 | { |
454 | fail_if(cell == NULL); | 454 | fail_if(!cell); |
455 | r = eina_matrixsparse_cell_position_get(cell, &row, &col); | 455 | r = eina_matrixsparse_cell_position_get(cell, &row, &col); |
456 | fail_if(r == EINA_FALSE); | 456 | fail_if(r == EINA_FALSE); |
457 | 457 | ||
458 | test1 = eina_matrixsparse_cell_data_get(cell); | 458 | test1 = eina_matrixsparse_cell_data_get(cell); |
459 | fail_if(test1 == NULL || *test1 != data[row][col]); | 459 | fail_if(!test1 || *test1 != data[row][col]); |
460 | } | 460 | } |
461 | eina_iterator_free(it); | 461 | eina_iterator_free(it); |
462 | 462 | ||
463 | it = eina_matrixsparse_iterator_complete_new(matrix); | 463 | it = eina_matrixsparse_iterator_complete_new(matrix); |
464 | fail_if(it == NULL); | 464 | fail_if(!it); |
465 | EINA_ITERATOR_FOREACH(it, cell) | 465 | EINA_ITERATOR_FOREACH(it, cell) |
466 | { | 466 | { |
467 | fail_if(cell == NULL); | 467 | fail_if(!cell); |
468 | r = eina_matrixsparse_cell_position_get(cell, &row, &col); | 468 | r = eina_matrixsparse_cell_position_get(cell, &row, &col); |
469 | fail_if(r == EINA_FALSE); | 469 | fail_if(r == EINA_FALSE); |
470 | 470 | ||
diff --git a/legacy/eina/src/tests/eina_test_mempool.c b/legacy/eina/src/tests/eina_test_mempool.c index f911fff7c3..a17d06d6bb 100644 --- a/legacy/eina/src/tests/eina_test_mempool.c +++ b/legacy/eina/src/tests/eina_test_mempool.c | |||
@@ -68,9 +68,9 @@ _eina_mempool_test(Eina_Mempool *mp, Eina_Bool with_realloc, Eina_Bool with_gc) | |||
68 | eina_mempool_free(mp, tbl[i]); | 68 | eina_mempool_free(mp, tbl[i]); |
69 | 69 | ||
70 | if (with_realloc) | 70 | if (with_realloc) |
71 | fail_if(eina_mempool_realloc(mp, tbl[500], 25) == NULL); | 71 | fail_if(!eina_mempool_realloc(mp, tbl[500], 25)); |
72 | else | 72 | else |
73 | fail_if(eina_mempool_realloc(mp, tbl[500], 25) != NULL); | 73 | fail_if(!!eina_mempool_realloc(mp, tbl[500], 25)); |
74 | 74 | ||
75 | if (with_gc) | 75 | if (with_gc) |
76 | { | 76 | { |
diff --git a/legacy/eina/src/tests/eina_test_rbtree.c b/legacy/eina/src/tests/eina_test_rbtree.c index fabe2bfd2a..cb8b85d993 100644 --- a/legacy/eina/src/tests/eina_test_rbtree.c +++ b/legacy/eina/src/tests/eina_test_rbtree.c | |||
@@ -30,7 +30,7 @@ | |||
30 | static inline Eina_Bool | 30 | static inline Eina_Bool |
31 | _eina_rbtree_is_red(Eina_Rbtree *tree) | 31 | _eina_rbtree_is_red(Eina_Rbtree *tree) |
32 | { | 32 | { |
33 | return tree != NULL && tree->color == EINA_RBTREE_RED; | 33 | return !!tree && tree->color == EINA_RBTREE_RED; |
34 | } | 34 | } |
35 | 35 | ||
36 | static int | 36 | static int |
@@ -261,7 +261,7 @@ START_TEST(eina_rbtree_simple_remove) | |||
261 | _eina_rbtree_black_height(root, | 261 | _eina_rbtree_black_height(root, |
262 | EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); | 262 | EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); |
263 | 263 | ||
264 | fail_if(root == NULL); | 264 | fail_if(!root); |
265 | 265 | ||
266 | i = 69; | 266 | i = 69; |
267 | lookup = eina_rbtree_inline_lookup(root, | 267 | lookup = eina_rbtree_inline_lookup(root, |
@@ -271,7 +271,7 @@ START_TEST(eina_rbtree_simple_remove) | |||
271 | eina_rbtree_int_key), | 271 | eina_rbtree_int_key), |
272 | NULL); | 272 | NULL); |
273 | _eina_rbtree_black_height(root, EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); | 273 | _eina_rbtree_black_height(root, EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); |
274 | fail_if(lookup == NULL); | 274 | fail_if(!lookup); |
275 | 275 | ||
276 | root = | 276 | root = |
277 | eina_rbtree_inline_remove(root, lookup, EINA_RBTREE_CMP_NODE_CB( | 277 | eina_rbtree_inline_remove(root, lookup, EINA_RBTREE_CMP_NODE_CB( |
@@ -325,7 +325,7 @@ START_TEST(eina_rbtree_simple_remove2) | |||
325 | _eina_rbtree_black_height(root, | 325 | _eina_rbtree_black_height(root, |
326 | EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); | 326 | EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); |
327 | 327 | ||
328 | fail_if(root == NULL); | 328 | fail_if(!root); |
329 | 329 | ||
330 | i = 69; | 330 | i = 69; |
331 | lookup = eina_rbtree_inline_lookup(root, | 331 | lookup = eina_rbtree_inline_lookup(root, |
@@ -335,7 +335,7 @@ START_TEST(eina_rbtree_simple_remove2) | |||
335 | eina_rbtree_int_key), | 335 | eina_rbtree_int_key), |
336 | NULL); | 336 | NULL); |
337 | _eina_rbtree_black_height(root, EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); | 337 | _eina_rbtree_black_height(root, EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); |
338 | fail_if(lookup == NULL); | 338 | fail_if(!lookup); |
339 | 339 | ||
340 | root = | 340 | root = |
341 | eina_rbtree_inline_remove(root, lookup, EINA_RBTREE_CMP_NODE_CB( | 341 | eina_rbtree_inline_remove(root, lookup, EINA_RBTREE_CMP_NODE_CB( |
@@ -419,7 +419,7 @@ START_TEST(eina_rbtree_simple_remove3) | |||
419 | _eina_rbtree_black_height(root, | 419 | _eina_rbtree_black_height(root, |
420 | EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); | 420 | EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); |
421 | 421 | ||
422 | fail_if(root == NULL); | 422 | fail_if(!root); |
423 | 423 | ||
424 | i = 1113497590; | 424 | i = 1113497590; |
425 | lookup = eina_rbtree_inline_lookup(root, | 425 | lookup = eina_rbtree_inline_lookup(root, |
@@ -429,7 +429,7 @@ START_TEST(eina_rbtree_simple_remove3) | |||
429 | eina_rbtree_int_key), | 429 | eina_rbtree_int_key), |
430 | NULL); | 430 | NULL); |
431 | _eina_rbtree_black_height(root, EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); | 431 | _eina_rbtree_black_height(root, EINA_RBTREE_CMP_NODE_CB(eina_rbtree_int_cmp)); |
432 | fail_if(lookup == NULL); | 432 | fail_if(!lookup); |
433 | 433 | ||
434 | root = | 434 | root = |
435 | eina_rbtree_inline_remove(root, lookup, EINA_RBTREE_CMP_NODE_CB( | 435 | eina_rbtree_inline_remove(root, lookup, EINA_RBTREE_CMP_NODE_CB( |
diff --git a/legacy/eina/src/tests/eina_test_str.c b/legacy/eina/src/tests/eina_test_str.c index f0ea291731..fc34fd92ad 100644 --- a/legacy/eina/src/tests/eina_test_str.c +++ b/legacy/eina/src/tests/eina_test_str.c | |||
@@ -91,25 +91,25 @@ START_TEST(str_split) | |||
91 | eina_init(); | 91 | eina_init(); |
92 | 92 | ||
93 | result = eina_str_split_full("nomatch", "", -1, &elements); | 93 | result = eina_str_split_full("nomatch", "", -1, &elements); |
94 | fail_if(result != NULL); | 94 | fail_if(!!result); |
95 | fail_if(elements != 0); | 95 | fail_if(elements != 0); |
96 | 96 | ||
97 | result = eina_str_split_full("nomatch", "x", -1, &elements); | 97 | result = eina_str_split_full("nomatch", "x", -1, &elements); |
98 | fail_if(result == NULL); | 98 | fail_if(!result); |
99 | fail_if(elements != 1); | 99 | fail_if(elements != 1); |
100 | fail_if(strcmp(result[0], "nomatch") != 0); | 100 | fail_if(strcmp(result[0], "nomatch") != 0); |
101 | free(result[0]); | 101 | free(result[0]); |
102 | free(result); | 102 | free(result); |
103 | 103 | ||
104 | result = eina_str_split_full("nomatch", "xyz", -1, &elements); | 104 | result = eina_str_split_full("nomatch", "xyz", -1, &elements); |
105 | fail_if(result == NULL); | 105 | fail_if(!result); |
106 | fail_if(elements != 1); | 106 | fail_if(elements != 1); |
107 | fail_if(strcmp(result[0], "nomatch") != 0); | 107 | fail_if(strcmp(result[0], "nomatch") != 0); |
108 | free(result[0]); | 108 | free(result[0]); |
109 | free(result); | 109 | free(result); |
110 | 110 | ||
111 | result = eina_str_split_full("match:match:match", ":", -1, &elements); | 111 | result = eina_str_split_full("match:match:match", ":", -1, &elements); |
112 | fail_if(result == NULL); | 112 | fail_if(!result); |
113 | fail_if(elements != 3); | 113 | fail_if(elements != 3); |
114 | while (elements >= 1) | 114 | while (elements >= 1) |
115 | { | 115 | { |
@@ -120,7 +120,7 @@ START_TEST(str_split) | |||
120 | free(result); | 120 | free(result); |
121 | 121 | ||
122 | result = eina_str_split_full("a:b:c", ":", -1, &elements); | 122 | result = eina_str_split_full("a:b:c", ":", -1, &elements); |
123 | fail_if(result == NULL); | 123 | fail_if(!result); |
124 | fail_if(elements != 3); | 124 | fail_if(elements != 3); |
125 | fail_if(strcmp(result[0], "a") != 0); | 125 | fail_if(strcmp(result[0], "a") != 0); |
126 | fail_if(strcmp(result[1], "b") != 0); | 126 | fail_if(strcmp(result[1], "b") != 0); |
@@ -129,7 +129,7 @@ START_TEST(str_split) | |||
129 | free(result); | 129 | free(result); |
130 | 130 | ||
131 | result = eina_str_split_full("a:b:", ":", -1, &elements); | 131 | result = eina_str_split_full("a:b:", ":", -1, &elements); |
132 | fail_if(result == NULL); | 132 | fail_if(!result); |
133 | fail_if(elements != 3); | 133 | fail_if(elements != 3); |
134 | fail_if(strcmp(result[0], "a") != 0); | 134 | fail_if(strcmp(result[0], "a") != 0); |
135 | fail_if(strcmp(result[1], "b") != 0); | 135 | fail_if(strcmp(result[1], "b") != 0); |
@@ -138,7 +138,7 @@ START_TEST(str_split) | |||
138 | free(result); | 138 | free(result); |
139 | 139 | ||
140 | result = eina_str_split_full(":b:c", ":", -1, &elements); | 140 | result = eina_str_split_full(":b:c", ":", -1, &elements); |
141 | fail_if(result == NULL); | 141 | fail_if(!result); |
142 | fail_if(elements != 3); | 142 | fail_if(elements != 3); |
143 | fail_if(strcmp(result[0], "") != 0); | 143 | fail_if(strcmp(result[0], "") != 0); |
144 | fail_if(strcmp(result[1], "b") != 0); | 144 | fail_if(strcmp(result[1], "b") != 0); |
@@ -147,7 +147,7 @@ START_TEST(str_split) | |||
147 | free(result); | 147 | free(result); |
148 | 148 | ||
149 | result = eina_str_split_full(":", ":", -1, &elements); | 149 | result = eina_str_split_full(":", ":", -1, &elements); |
150 | fail_if(result == NULL); | 150 | fail_if(!result); |
151 | fail_if(elements != 2); | 151 | fail_if(elements != 2); |
152 | fail_if(strcmp(result[0], "") != 0); | 152 | fail_if(strcmp(result[0], "") != 0); |
153 | fail_if(strcmp(result[1], "") != 0); | 153 | fail_if(strcmp(result[1], "") != 0); |
@@ -155,14 +155,14 @@ START_TEST(str_split) | |||
155 | free(result); | 155 | free(result); |
156 | 156 | ||
157 | result = eina_str_split_full("a", "!!!!!!!!!", -1, &elements); | 157 | result = eina_str_split_full("a", "!!!!!!!!!", -1, &elements); |
158 | fail_if(result == NULL); | 158 | fail_if(!result); |
159 | fail_if(elements != 1); | 159 | fail_if(elements != 1); |
160 | fail_if(strcmp(result[0], "a") != 0); | 160 | fail_if(strcmp(result[0], "a") != 0); |
161 | free(result[0]); | 161 | free(result[0]); |
162 | free(result); | 162 | free(result); |
163 | 163 | ||
164 | result = eina_str_split_full("aaba", "ab", -1, &elements); | 164 | result = eina_str_split_full("aaba", "ab", -1, &elements); |
165 | fail_if(result == NULL); | 165 | fail_if(!result); |
166 | fail_if(elements != 2); | 166 | fail_if(elements != 2); |
167 | fail_if(strcmp(result[0], "a") != 0); | 167 | fail_if(strcmp(result[0], "a") != 0); |
168 | fail_if(strcmp(result[1], "a") != 0); | 168 |