Source-Changes-HG archive

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

[src/netbsd-1-5]: src/usr.sbin Approved by thorpej:



details:   https://anonhg.NetBSD.org/src/rev/c438db1e58a3
branches:  netbsd-1-5
changeset: 488742:c438db1e58a3
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Jul 26 23:13:30 2000 +0000

description:
Approved by thorpej:
Avoid using the `typeof' operator.

basesrc/usr.sbin/gspa/gspa/gsp_ass.h                    1.5 -> 1.6
basesrc/usr.sbin/gspa/gspa/gspa.c                       1.5 -> 1.6
basesrc/usr.sbin/inetd/inetd.c                          1.69 -> 1.70

diffstat:

 usr.sbin/gspa/gspa/gsp_ass.h |  6 +++---
 usr.sbin/gspa/gspa/gspa.c    |  8 ++++----
 usr.sbin/inetd/inetd.c       |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (82 lines):

diff -r 2a4fb485398c -r c438db1e58a3 usr.sbin/gspa/gspa/gsp_ass.h
--- a/usr.sbin/gspa/gspa/gsp_ass.h      Wed Jul 26 23:12:25 2000 +0000
+++ b/usr.sbin/gspa/gspa/gsp_ass.h      Wed Jul 26 23:13:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gsp_ass.h,v 1.5 1999/06/22 20:27:21 is Exp $   */
+/*     $NetBSD: gsp_ass.h,v 1.5.8.1 2000/07/26 23:13:30 mycroft Exp $  */
 /*
  * GSP assembler - definitions
  *
@@ -127,7 +127,7 @@
 /* Prototypes */
 operand abs_adr(expr);
 operand add_operand(operand, operand);
-char *alloc(size_t nbytes);
+void *alloc(size_t nbytes);
 expr bexpr(int, expr, expr);
 void do_asg(char *, expr, int flags);
 void do_list_pc(void);
@@ -186,4 +186,4 @@
 #endif
 #endif
 
-#define new(x) ((x) = (typeof (x)) alloc (sizeof(*(x))))
+#define new(x) ((x) = alloc (sizeof(*(x))))
diff -r 2a4fb485398c -r c438db1e58a3 usr.sbin/gspa/gspa/gspa.c
--- a/usr.sbin/gspa/gspa/gspa.c Wed Jul 26 23:12:25 2000 +0000
+++ b/usr.sbin/gspa/gspa/gspa.c Wed Jul 26 23:13:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gspa.c,v 1.5 1999/06/22 20:27:21 is Exp $      */
+/*     $NetBSD: gspa.c,v 1.5.8.1 2000/07/26 23:13:30 mycroft Exp $     */
 /*
  * GSP assembler main program
  *
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: gspa.c,v 1.5 1999/06/22 20:27:21 is Exp $");
+__RCSID("$NetBSD: gspa.c,v 1.5.8.1 2000/07/26 23:13:30 mycroft Exp $");
 #endif
 
 #include <sys/param.h>
@@ -291,10 +291,10 @@
        longjmp(synerrjmp, 1);
 }
 
-char *
+void *
 alloc(size_t nbytes)
 {
-       char *p;
+       void *p;
 
        if( (p = malloc(nbytes)) == NULL ){
                fprintf(stderr, "Insufficient memory at line %d\n", lineno);
diff -r 2a4fb485398c -r c438db1e58a3 usr.sbin/inetd/inetd.c
--- a/usr.sbin/inetd/inetd.c    Wed Jul 26 23:12:25 2000 +0000
+++ b/usr.sbin/inetd/inetd.c    Wed Jul 26 23:13:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inetd.c,v 1.62.2.3 2000/07/13 05:53:23 itojun Exp $    */
+/*     $NetBSD: inetd.c,v 1.62.2.4 2000/07/26 23:13:31 mycroft Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
 #if 0
 static char sccsid[] = "@(#)inetd.c    8.4 (Berkeley) 4/13/94";
 #else
-__RCSID("$NetBSD: inetd.c,v 1.62.2.3 2000/07/13 05:53:23 itojun Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.62.2.4 2000/07/26 23:13:31 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -289,7 +289,7 @@
 
 /* Reserve some descriptors, 3 stdio + at least: 1 log, 1 conf. file */
 #define FD_MARGIN      (8)
-typeof(((struct rlimit *)0)->rlim_cur) rlim_ofile_cur = OPEN_MAX;
+rlim_t         rlim_ofile_cur = OPEN_MAX;
 
 #ifdef RLIMIT_NOFILE
 struct rlimit  rlim_ofile;



Home | Main Index | Thread Index | Old Index