The following commit has been merged in the master branch:
commit 19f7c15e9ab11eafce814aedc9fcd49306a706ba
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Sun Aug 3 20:42:38 2008 +0300

    Assign directly to l_r instead of a temporary variable

diff --git a/ChangeLog b/ChangeLog
index 77000d3..c945758 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-08-03  Guillem Jover  <[EMAIL PROTECTED]>
 
+       * src/pkg-show.c (limiteddescription): Assign directly to l_r instead
+       of a temporary variable.
+
+2008-08-03  Guillem Jover  <[EMAIL PROTECTED]>
+
        * utils/start-stop-daemon.c: Move the different implementations
        of the same function for different operating systems together.
 
diff --git a/src/pkg-show.c b/src/pkg-show.c
index aa22eb3..c3397c5 100644
--- a/src/pkg-show.c
+++ b/src/pkg-show.c
@@ -32,7 +32,6 @@ limiteddescription(struct pkginfo *pkg,
                    int maxl, const char **pdesc_r, int *l_r)
 {
        const char *pdesc, *p;
-       int l;
 
        pdesc = pkg->installed.valid ? pkg->installed.description : NULL;
        if (!pdesc)
@@ -40,8 +39,8 @@ limiteddescription(struct pkginfo *pkg,
        p = strchr(pdesc, '\n');
        if (!p)
                p = pdesc + strlen(pdesc);
-       l = min(p - pdesc, maxl);
+
+       *l_r = min(p - pdesc, maxl);
        *pdesc_r = pdesc;
-       *l_r = l;
 }
 

-- 
dpkg's main repository


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

Reply via email to