On Wed, Sep 16, 2015 at 12:26 AM, Dan Williams <d...@redhat.com> wrote: >> + /* +CMGR: <stat>,<alpha>,<length>(whitespace)<pdu> */ >> + /* The <alpha> and <length> fields are matched, but not currently used >> */ >> + r = g_regex_new >> ("\\+CMGR:\\s*(\\d+)\\s*,([^,]*),\\s*(\\d+)\\s*([^\\r\\n]*)", 0, 0, error); >> + g_assert (r != NULL); > > You could also do g_assert_no_error (error) before the g_assert(r) too.
Passing the error here in g_regex_new() with a constant pattern isn't very useful; if you didn't get an error in the regex when you tested it, no one will get it. So either g_assert_no_error() as Dan suggests or just pass NULL instead of error. -- Aleksander https://aleksander.es _______________________________________________ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel