git » libjio » commit 9cf912f

In strdup() checks, there are two checks with the wrong variable name (the one strdup()ed before).

author Alberto Bertogli
2004-04-05 15:32:05 UTC
committer Alberto Bertogli
2007-07-15 12:31:26 UTC
parent 1273f0299d5a4ab414457bbbff8eeddc7bcfcd42

In strdup() checks, there are two checks with the wrong variable name (the one strdup()ed before).

In strdup() checks, there are two checks with the wrong variable name (the one
strdup()ed before).

libjio.c +2 -2

diff --git a/libjio.c b/libjio.c
index 4ed725e..56121c8 100644
--- a/libjio.c
+++ b/libjio.c
@@ -112,7 +112,7 @@ static int get_jdir(const char *filename, char *jdir)
 	base = basename(baset);
 
 	dirt = strdup(filename);
-	if (baset == NULL)
+	if (dirt == NULL)
 		return 0;
 	dir = dirname(dirt);
 
@@ -136,7 +136,7 @@ static int get_jtfile(const char *filename, int tid, char *jtfile)
 	base = basename(baset);
 
 	dirt = strdup(filename);
-	if (baset == NULL)
+	if (dirt == NULL)
 		return 0;
 	dir = dirname(dirt);