summaryrefslogtreecommitdiff
path: root/net-mgmt/p0f/files/patch-p0f.c
blob: 5d5c61e2f1cad9e7e350ebf3557e56434e097b08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- p0f.c.orig	Thu Jan 17 21:05:58 2002
+++ p0f.c	Mon Jan 21 00:22:56 2002
@@ -348,10 +348,9 @@
         T_tstamp = 1;
 	break;
       case 'o':
-        { FILE* x;
-          x=fopen(optarg,"a");
-          if (!x) { perror(optarg); exit(1); }
-          stdout=x;
+        if (!freopen(optarg,"a",stdout)) {
+          perror(optarg);
+          exit(1);
         }
 	break;
       default: