Package: lslk
Version: 1.29-3
Severity: important
Tags: patch

The function savelock() returns int, but the only return statements in it are
the ones that return 0 because of a failure. On success it just falls off the
end of the function returning some random left-over register value. This
random left-over value has a fairly good chance of being 0 (in fact it seems
to always be 0 in the ppc build.) Successes are interpreted as failures and
nothing gets printed.

Compiling with warnings enabled reveals a lot more questionable code, but
this fix at least gets it to print something.

/home/pacman/usrc/lslk-1.29/dialects/linux/proc/dlock.c
--- lslk-1.29.orig/dialects/linux/proc/dlock.c
+++ lslk-1.29/dialects/linux/proc/dlock.c
@@ -339,4 +339,5 @@
  * Set the lock source to local; Linux doesn't support remote locking.
  */
        Lp->src = 0;
+       return 1;
 }

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.22.1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages lslk depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries

lslk recommends no packages.

-- debconf-show failed


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

Reply via email to