summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/importer/firefox_profile_lock_posix.cc2
-rw-r--r--chrome/tools/convert_dict/convert_dict.cc7
2 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock_posix.cc b/chrome/browser/importer/firefox_profile_lock_posix.cc
index 0058bb2..84856c0 100644
--- a/chrome/browser/importer/firefox_profile_lock_posix.cc
+++ b/chrome/browser/importer/firefox_profile_lock_posix.cc
@@ -62,7 +62,7 @@ void FirefoxProfileLock::Init() {
void FirefoxProfileLock::Lock() {
if (HasAcquired())
return;
- lock_fd_ = open(lock_file_.value().c_str(), O_CREAT | O_EXCL);
+ lock_fd_ = open(lock_file_.value().c_str(), O_CREAT | O_EXCL, 0644);
}
void FirefoxProfileLock::Unlock() {
diff --git a/chrome/tools/convert_dict/convert_dict.cc b/chrome/tools/convert_dict/convert_dict.cc
index 870e322..ce17dc7 100644
--- a/chrome/tools/convert_dict/convert_dict.cc
+++ b/chrome/tools/convert_dict/convert_dict.cc
@@ -15,6 +15,7 @@
#include "base/file_util.h"
#include "base/icu_util.h"
+#include "base/logging.h"
#include "base/process_util.h"
#include "base/string_util.h"
#include "chrome/third_party/hunspell/google/bdict_reader.h"
@@ -63,7 +64,8 @@ bool VerifyWords(const convert_dict::DicReader::WordList& org_words,
int PrintHelp() {
printf("Usage: convert_dict <dicfile base name>\n\n");
- printf("Example:\n convert_dict en-US\nwill read en-US.dic / en-US.aff and\n");
+ printf("Example:\n");
+ printf(" convert_dict en-US\nwill read en-US.dic / en-US.aff and\n");
printf("generate en-US.bdic\n\n");
return 1;
}
@@ -119,7 +121,8 @@ int main(int argc, char* argv[]) {
printf("ERROR writing file\n");
return 1;
}
- fwrite(&serialized[0], 1, serialized.size(), out_file);
+ size_t written = fwrite(&serialized[0], 1, serialized.size(), out_file);
+ CHECK(written == serialized.size());
file_util::CloseFile(out_file);
return 0;