From: Justin Viiret Date: Thu, 29 Jun 2017 03:18:51 +0000 (+1000) Subject: smallwrite_dump: use StdioFile X-Git-Tag: v4.6.0^2~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82606b3ffea660ebe29f844bdd067a766f2e5f2a;p=thirdparty%2Fvectorscan.git smallwrite_dump: use StdioFile --- diff --git a/src/smallwrite/smallwrite_dump.cpp b/src/smallwrite/smallwrite_dump.cpp index bdf55c30..b2c33ecf 100644 --- a/src/smallwrite/smallwrite_dump.cpp +++ b/src/smallwrite/smallwrite_dump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, Intel Corporation + * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -34,6 +34,7 @@ #include "nfa/nfa_build_util.h" #include "nfa/nfa_dump_api.h" #include "nfa/nfa_internal.h" +#include "util/dump_util.h" #include #include @@ -74,9 +75,8 @@ void smwrDumpNFA(const SmallWriteEngine *smwr, bool dump_raw, nfaGenerateDumpFiles(n, base + "smallwrite_nfa"); if (dump_raw) { - FILE *f = fopen((base + "smallwrite_nfa.raw").c_str(), "w"); + StdioFile f(base + "smallwrite_nfa.raw", "w"); fwrite(n, 1, n->length, f); - fclose(f); } }