From: Justin Viiret Date: Thu, 29 Jun 2017 03:09:16 +0000 (+1000) Subject: mpv_dump: use StdioFile X-Git-Tag: v4.6.0^2~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08e094748c9964d35331b99aa5a0c3204b232202;p=thirdparty%2Fvectorscan.git mpv_dump: use StdioFile --- diff --git a/src/nfa/mpv_dump.cpp b/src/nfa/mpv_dump.cpp index 9a8a4067..4979395d 100644 --- a/src/nfa/mpv_dump.cpp +++ b/src/nfa/mpv_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: @@ -132,7 +132,7 @@ void dumpCounter(FILE *f, const mpv_counter_info *c) { void nfaExecMpv_dump(const NFA *nfa, const string &base) { const mpv *m = (const mpv *)getImplNfa(nfa); - FILE *f = fopen_or_throw((base + ".txt").c_str(), "w"); + StdioFile f(base + ".txt", "w"); fprintf(f, "Puff the Magic Engines\n"); fprintf(f, "\n"); @@ -154,7 +154,6 @@ void nfaExecMpv_dump(const NFA *nfa, const string &base) { } dumpTextReverse(nfa, f); - fclose(f); } } // namespace ue2