=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/main.c,v retrieving revision 1.83 retrieving revision 1.84 diff -c -r1.83 -r1.84 *** src/usr.bin/netstat/main.c 2010/06/29 03:09:29 1.83 --- src/usr.bin/netstat/main.c 2010/06/30 03:32:55 1.84 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.83 2010/06/29 03:09:29 blambert Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.84 2010/06/30 03:32:55 lum Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* *************** *** 306,311 **** --- 306,329 ---- exit(0); } + #define BACKWARD_COMPATIBILITY + #ifdef BACKWARD_COMPATIBILITY + if (*argv) { + if (isdigit(**argv)) { + interval = atoi(*argv); + if (interval <= 0) + usage(); + ++argv; + iflag = 1; + } + if (*argv) { + nlistf = *argv; + if (*++argv) + memf = *argv; + } + } + #endif + /* * Discard setgid privileges if not the running kernel so that bad * guys can't print interesting stuff from kernel memory. *************** *** 325,348 **** if (nlistf == NULL && memf == NULL && !Pflag) if (setresgid(gid, gid, gid) == -1) err(1, "setresgid"); - - #define BACKWARD_COMPATIBILITY - #ifdef BACKWARD_COMPATIBILITY - if (*argv) { - if (isdigit(**argv)) { - interval = atoi(*argv); - if (interval <= 0) - usage(); - ++argv; - iflag = 1; - } - if (*argv) { - nlistf = *argv; - if (*++argv) - memf = *argv; - } - } - #endif if (kvm_nlist(kvmd, nl) < 0 || nl[0].n_type == 0) { if (nlistf) --- 343,348 ----