Hello,
probably that patch would be better as then czap still could
run without $HOME when getting confname via command line.

Kind regards,
Bernhard



--- czap.c.orig 2015-05-06 20:26:13.000000000 +0200
+++ czap.c      2015-05-06 21:40:51.354679687 +0200
@@ -314,9 +314,6 @@ int main(int argc, char **argv)
                return -1;
        }
 
-       if (!homedir)
-               ERROR("$HOME not set");
-
        snprintf (FRONTEND_DEV, sizeof(FRONTEND_DEV),
                  "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
 
@@ -328,8 +325,10 @@ int main(int argc, char **argv)
        if (!confname)
        {
                int len = strlen(homedir) + strlen(CHANNEL_FILE) + 18;
-               if (!homedir)
+               if (!homedir) {
                        ERROR("$HOME not set");
+                       return -1;
+               }
                confname = malloc(len);
                snprintf(confname, len, "%s/.czap/%i/%s",
                         homedir, adapter, CHANNEL_FILE);


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to