1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
Description: Ensure functions are correctly defined
Author: Stephen Kitt <skitt@debian.org>
--- a/lib/fstrcmp.c
+++ b/lib/fstrcmp.c
@@ -155,16 +155,8 @@
cause suboptimal diff output. It cannot cause incorrect diff
output. */
-static int diag PARAMS ((int, int, int, int, int, struct partition *));
-
static int
-diag (xoff, xlim, yoff, ylim, minimal, part)
- int xoff;
- int xlim;
- int yoff;
- int ylim;
- int minimal;
- struct partition *part;
+diag (int xoff, int xlim, int yoff, int ylim, int minimal, struct partition *part)
{
int *const fd = fdiag; /* Give the compiler a chance. */
int *const bd = bdiag; /* Additional help for the compiler. */
@@ -482,15 +474,8 @@
If MINIMAL is nonzero, find a minimal difference no matter how
expensive it is. */
-static void compareseq PARAMS ((int, int, int, int, int));
-
static void
-compareseq (xoff, xlim, yoff, ylim, minimal)
- int xoff;
- int xlim;
- int yoff;
- int ylim;
- int minimal;
+compareseq (int xoff, int xlim, int yoff, int ylim, int minimal)
{
const char *const xv = string[0].data; /* Help the compiler. */
const char *const yv = string[1].data;
@@ -578,9 +563,7 @@
similar. */
double
-fstrcmp (string1, string2)
- const char *string1;
- const char *string2;
+fstrcmp (const char *string1, const char *string2)
{
int i;
--- a/lib/fstrcmp.h
+++ b/lib/fstrcmp.h
@@ -20,6 +20,6 @@
#ifndef _FSTRCMP_H
#define _FSTRCMP_H
-double fstrcmp PARAMS ((const char *__s1, const char *__s2));
+double fstrcmp (const char *__s1, const char *__s2);
#endif
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -22,10 +22,9 @@
#endif
#undef malloc
+#include <stdlib.h>
#include <sys/types.h>
-char *malloc ();
-
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
--- a/lib/realloc.c
+++ b/lib/realloc.c
@@ -22,11 +22,9 @@
#endif
#undef realloc
+#include <stdlib.h>
#include <sys/types.h>
-char *malloc ();
-char *realloc ();
-
/* Change the size of an allocated block of memory P to N bytes,
with error checking. If N is zero, change it to 1. If P is NULL,
use malloc. */
|