summaryrefslogtreecommitdiffabout
path: root/parsing.c
Side-by-side diff
Diffstat (limited to 'parsing.c') (more/less context) (ignore whitespace changes)
-rw-r--r--parsing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/parsing.c b/parsing.c
index c9e4350..151c0fe 100644
--- a/parsing.c
+++ b/parsing.c
@@ -100,13 +100,16 @@ char *parse_user(char *t, char **name, char **email, unsigned long *date)
#define reencode(a, b, c)
#else
const char *reencode(char **txt, const char *src_enc, const char *dst_enc)
{
char *tmp;
- if (!txt || !*txt || !src_enc || !dst_enc)
+ if (!txt)
+ return NULL;
+
+ if (!*txt || !src_enc || !dst_enc)
return *txt;
/* no encoding needed if src_enc equals dst_enc */
if(!strcasecmp(src_enc, dst_enc))
return *txt;