Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst sysinst: warp factor.c to the 21st century



details:   https://anonhg.NetBSD.org/src/rev/6f1cc8a35c27
branches:  trunk
changeset: 980331:6f1cc8a35c27
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 31 20:51:04 2021 +0000

description:
sysinst: warp factor.c to the 21st century

That file contained some conditionally defined code that still used
old-style function definitions.

diffstat:

 usr.sbin/sysinst/factor.c |  16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diffs (48 lines):

diff -r 50823ba092e0 -r 6f1cc8a35c27 usr.sbin/sysinst/factor.c
--- a/usr.sbin/sysinst/factor.c Sun Jan 31 19:08:05 2021 +0000
+++ b/usr.sbin/sysinst/factor.c Sun Jan 31 20:51:04 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: factor.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
+/*     $NetBSD: factor.c,v 1.2 2021/01/31 20:51:04 rillig Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -32,10 +32,7 @@
  *
  */
 
-/* Prototypes for strict prototyping. */
-
 #include <sys/cdefs.h>
-
 #include <stdio.h>
 
 
@@ -55,8 +52,7 @@
 void factor (long val, long *fact_list, int fact_size, int *num_fact);
 
 static void
-build_primes(max)
-       long max;
+build_primes(long max)
 {
        long pc;
        int j;
@@ -83,15 +79,11 @@
 }
 
 /* factor:  prepare a list of prime factors of val.
-   The last number may not be a prime factor is the list is not
+   The last number may not be a prime factor if the list is not
    long enough. */
 
 void
-factor(val, fact_list, fact_size, num_fact)
-       long val;
-       long *fact_list;
-       int fact_size;
-       int *num_fact;
+factor(long val, long *fact_list, int fact_size, int *num_fact)
 {
        int i;
 



Home | Main Index | Thread Index | Old Index