From a167f6557fae2589e9305647bbb4ac12a68c3db3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 12 Apr 2015 21:03:51 +0100 Subject: unnecessary strcpy Change-Id: I98f12a01002a08d51f2232482cd015564cdb27b2 --- i18npool/source/localedata/LocaleNode.hxx | 1 - i18npool/source/localedata/filewriter.cxx | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'i18npool/source') diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx index 4f404044f9b2..b4b7127f584b 100644 --- a/i18npool/source/localedata/LocaleNode.hxx +++ b/i18npool/source/localedata/LocaleNode.hxx @@ -65,7 +65,6 @@ public: /// Return the locale string, something like en_US or de_DE const char * getLocale() const { return theLocale; } private: - char m_pcFile[1024]; char theLocale[50]; FILE *m_f; }; diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx index 9c301448f9f1..7264b12e9d80 100644 --- a/i18npool/source/localedata/filewriter.cxx +++ b/i18npool/source/localedata/filewriter.cxx @@ -26,10 +26,8 @@ OFileWriter::OFileWriter(const char *pcFile, const char *locale ) { - strncpy( m_pcFile , pcFile, sizeof(m_pcFile) ); - m_pcFile[sizeof(m_pcFile)-1] = 0; - printf("file generated=%s\n", m_pcFile); - m_f = fopen( m_pcFile , "w" ); + printf("file generated=%s\n", pcFile); + m_f = fopen(pcFile, "w"); strncpy( theLocale, locale, sizeof(theLocale) ); theLocale[sizeof(theLocale)-1] = 0; } -- cgit