On 03/03/11 14:35, Eric Blake wrote:
>> - if (pT != NUL)
>> + if (pz == NULL)
>> +return BAD_TIME;
>
> Here, you want errno to be ENOMEM, but mingw doesn't guarantee that...
Ick.
> ACK with that fixed.
ACK:
Subject: [PATCH] parse-duration: remove xalloc.h dependency
* lib/parse-duration
On 03/03/2011 03:16 PM, Bruce Korb wrote:
> xalloc.h drags in too much stuff:
>
> parse_period (cch_t * in_pz)
> {
> - char * pz = xstrdup (in_pz);
> - char * pT = strchr (pz, 'T');
> + char * pz = strdup (in_pz);
> + char * pT;
>char * ps;
>void * fptr = pz;
>time_t res =
xalloc.h drags in too much stuff:
diff --git a/lib/parse-duration.c b/lib/parse-duration.c
index 8c28133..7c8bdec 100644
--- a/lib/parse-duration.c
+++ b/lib/parse-duration.c
@@ -26,7 +26,6 @@
#include
#include
#include
-#include "xalloc.h"
#ifndef NUL
#define NUL '\0'
@@ -406,13 +405,17