The following commit has been merged in the master branch:
commit efefc09d914ecedfdad02fd07d4eb5f1c2268542
Author: Guillem Jover <[email protected]>
Date:   Mon Oct 11 20:32:50 2010 +0200

    Use setaction() instead of directly assigning to cipaction

diff --git a/src/divertcmd.c b/src/divertcmd.c
index 4ebaae2..25dc122 100644
--- a/src/divertcmd.c
+++ b/src/divertcmd.c
@@ -716,7 +716,7 @@ main(int argc, const char * const *argv)
        myopt(&argv, cmdinfos);
 
        if (!cipaction)
-               cipaction = &cmdinfo_add;
+               setaction(&cmdinfo_add, NULL);
 
        actionfunction = (int (*)(const char *const *))cipaction->farg;
 
diff --git a/src/main.c b/src/main.c
index 704e1e8..a504794 100644
--- a/src/main.c
+++ b/src/main.c
@@ -652,7 +652,7 @@ void commandfd(const char *const *argv) {
       if (newargs[i])
         newargs[i] = m_strdup(newargs[i]);
 
-    cipaction= NULL;
+    setaction(NULL, NULL);
     myopt((const char *const**)&newargs,cmdinfos);
     if (!cipaction) badusage(_("need an action option"));
 

-- 
dpkg's main repository


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

Reply via email to