That's got to be one of the hardest macro names to read, ever,
(it's phrased with an implicit negative in the condition,
rather than something simple like "assert").
Plus, it's evil, since it's a macro with a return in it.
And finally, it's actually *longer* than just typing "if"
and "return". So what's the point of this ugly idiom?
get_wday (const char *in, size_t inlen)
{
int wday;
-
- g_return_val_if_fail (in != NULL, -1);
+
+ if (in == NULL)
+ return -1;
if (inlen < 3)
return -1;
{
int mday;
- g_return_val_if_fail (in != NULL, -1);
+ if (in == NULL)
+ return -1;
mday = decode_int (in, inlen);
{
int i;
- g_return_val_if_fail (in != NULL, -1);
+ if (in == NULL)
+ return -1;
if (inlen < 3)
return -1;
{
int year;
- g_return_val_if_fail (in != NULL, -1);
+ if (in == NULL)
+ return -1;
if ((year = decode_int (in, inlen)) == -1)
return -1;
struct tm tm;
time_t t;
- g_return_val_if_fail (tokens != NULL, (time_t) 0);
+ if (tokens == NULL)
+ return 0;
token = tokens;