Browse Source

Remove dead code

Remove unused variables
Silence some warnings
lint(1) is your friend
OPENBSD_2_0
tholo 28 years ago
parent
commit
c3e8d031d3
6 changed files with 15 additions and 13 deletions
  1. +2
    -1
      src/lib/libc/crypt/md5crypt.c
  2. +2
    -2
      src/lib/libc/stdlib/malloc.c
  3. +3
    -3
      src/lib/libc/stdlib/merge.c
  4. +2
    -3
      src/lib/libc/stdlib/random.c
  5. +4
    -2
      src/lib/libc/stdlib/system.c
  6. +2
    -2
      src/lib/libc/string/__strerror.c

+ 2
- 1
src/lib/libc/crypt/md5crypt.c View File

@ -9,11 +9,12 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.4 1996/08/19 08:19:50 tholo Exp $";
static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.5 1996/09/15 09:30:46 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <md5.h>
static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */


+ 2
- 2
src/lib/libc/stdlib/malloc.c View File

@ -8,7 +8,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$OpenBSD: malloc.c,v 1.10 1996/09/11 03:04:43 deraadt Exp $";
static char rcsid[] = "$OpenBSD: malloc.c,v 1.11 1996/09/15 09:31:49 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@ -813,7 +813,7 @@ malloc_bytes(size)
;
/* Find that bit, and tweak it */
k = ffs(*lp) - 1;
k = ffs((unsigned)*lp) - 1;
*lp ^= 1<<k;
/* If there are no more free, remove from free-list */


+ 3
- 3
src/lib/libc/stdlib/merge.c View File

@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: merge.c,v 1.2 1996/08/19 08:33:38 tholo Exp $";
static char *rcsid = "$OpenBSD: merge.c,v 1.3 1996/09/15 09:31:50 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@ -147,7 +147,7 @@ mergesort(base, nmemb, size, cmp)
sense = 0;
}
if (!big) { /* here i = 0 */
LINEAR: while ((b += size) < t && cmp(q, b) >sense)
while ((b += size) < t && cmp(q, b) >sense)
if (++i == 6) {
big = 1;
goto EXPONENTIAL;
@ -168,7 +168,7 @@ EXPONENTIAL: for (i = size; ; i <<= 1)
goto FASTCASE;
} else
b = p;
SLOWCASE: while (t > b+size) {
while (t > b+size) {
i = (((t - b) / size) >> 1) * size;
if ((*cmp)(q, p = b + i) <= sense)
t = p;


+ 2
- 3
src/lib/libc/stdlib/random.c View File

@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: random.c,v 1.3 1996/08/19 08:33:46 tholo Exp $";
static char *rcsid = "$OpenBSD: random.c,v 1.4 1996/09/15 09:31:51 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@ -193,13 +193,12 @@ srandom(x)
u_int x;
{
register long int test;
register int i, j;
register int i;
ldiv_t val;
if (rand_type == TYPE_0)
state[0] = x;
else {
j = 1;
state[0] = x;
for (i = 1; i < rand_deg; i++) {
/*


+ 4
- 2
src/lib/libc/stdlib/system.c View File

@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: system.c,v 1.2 1996/08/19 08:33:54 tholo Exp $";
static char *rcsid = "$OpenBSD: system.c,v 1.3 1996/09/15 09:31:52 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -52,11 +52,13 @@ system(command)
sig_t intsave, quitsave;
int omask;
int pstat;
char *argp[] = {"sh", "-c", (char *) command, NULL};
char *argp[] = {"sh", "-c", NULL, NULL};
if (!command) /* just checking... */
return(1);
argp[2] = (char *)command;
omask = sigblock(sigmask(SIGCHLD));
switch(pid = vfork()) {
case -1: /* error */


+ 2
- 2
src/lib/libc/string/__strerror.c View File

@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: __strerror.c,v 1.3 1996/08/19 08:33:55 tholo Exp $";
static char *rcsid = "$OpenBSD: __strerror.c,v 1.4 1996/09/15 09:31:53 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef NLS
@ -64,7 +64,7 @@ __strerror(num, buf)
register unsigned int errnum;
#ifdef NLS
nl_catd catd ;
nl_catd catd;
catd = catopen("libc", 0);
#endif


Loading…
Cancel
Save