From c87f945a5aac1544f3abb7d05ce6ed778e9f138a Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Tue, 26 Feb 2013 09:16:49 -0500 Subject: [PATCH] Fix fc_sort.c warning uncovered by recent gcc output_name in main was set to argv[2] but then argv[2] rather than output_name was used later in the function. --- support/fc_sort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/fc_sort.c b/support/fc_sort.c index 6c4303599..e03ef3b58 100644 --- a/support/fc_sort.c +++ b/support/fc_sort.c @@ -1,4 +1,4 @@ -/* Copyright 2005, Tresys Technology +/* Copyright 2005,2013 Tresys Technology * * Some parts of this came from matchpathcon.c in libselinux */ @@ -523,7 +523,7 @@ int main(int argc, char *argv[]) fc_merge_sort(master); /* Open the output file. */ - if (!(out_file = fopen(argv[2], "w"))) { + if (!(out_file = fopen(output_name, "w"))) { printf("Error: failure opening output file for write.\n"); return -1; }