Changeset d57484d


Ignore:
Timestamp:
2016-12-26T22:39:18Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
a04705b
Parents:
90a45b8
Message:

Change some asserts into g_return_if_fail()

Because crashing asserts are bad, and maybe this helps fix the
captures_build_path issue with debian's reproducible builds
(those asserts probably include FILE)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r90a45b8 rd57484d  
    15141514                        }
    15151515                }
    1516                 assert(l != NULL);  /* a match should always be found */
     1516                g_return_val_if_fail(l, NULL);
    15171517                if (!l) {
    15181518                        return NULL;
  • protocols/oscar/rxhandlers.c

    r90a45b8 rd57484d  
    235235        struct aim_rxcblist_s *newcb;
    236236
    237         if (!conn) {
    238                 return -1;
    239         }
    240 
    241         if (checkdisallowed(family, type)) {
    242                 g_assert(0);
    243                 return -1;
    244         }
     237        g_return_val_if_fail(conn, -1);
     238        g_return_val_if_fail(checkdisallowed(family, type), -1);
    245239
    246240        if (!(newcb = (struct aim_rxcblist_s *) g_new0(struct aim_rxcblist_s, 1))) {
  • protocols/purple/purple.c

    r90a45b8 rd57484d  
    16901690        }
    16911691
    1692         g_assert((int) B_EV_IO_READ == (int) PURPLE_INPUT_READ);
    1693         g_assert((int) B_EV_IO_WRITE == (int) PURPLE_INPUT_WRITE);
     1692        g_return_if_fail((int) B_EV_IO_READ == (int) PURPLE_INPUT_READ);
     1693        g_return_if_fail((int) B_EV_IO_WRITE == (int) PURPLE_INPUT_WRITE);
    16941694
    16951695        dir = g_strdup_printf("%s/purple", global.conf->configdir);
Note: See TracChangeset for help on using the changeset viewer.