From a18fbfe873397f4b0a868366f4532927cc74f9d5 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Thu, 29 Jun 2017 12:46:56 +1000 Subject: [PATCH] castle_dump: use StdioFile --- src/nfa/castle_dump.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nfa/castle_dump.cpp b/src/nfa/castle_dump.cpp index 1514ca8c..595b98ec 100644 --- a/src/nfa/castle_dump.cpp +++ b/src/nfa/castle_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: @@ -71,7 +71,7 @@ void dumpTextSubCastle(const SubCastle &sub, FILE *f) { void nfaExecCastle_dump(const struct NFA *nfa, const string &base) { const Castle *c = (const Castle *)getImplNfa(nfa); - FILE *f = fopen_or_throw((base + ".txt").c_str(), "w"); + StdioFile f(base + ".txt", "w"); fprintf(f, "Castle multi-tenant repeat engine\n"); fprintf(f, "\n"); @@ -117,7 +117,6 @@ void nfaExecCastle_dump(const struct NFA *nfa, const string &base) { fprintf(f, "Sub %u:\n", i); dumpTextSubCastle(sub[i], f); } - fclose(f); } } // namespace ue2