diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2013-02-22 20:45:34 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2013-02-22 20:45:34 +0100 |
commit | 073326715ed2ccf42cafc8f79641c990b267cf2c (patch) | |
tree | 8c8f506dda9df4fa1333201db00d5326e6cc603b /src/uicmd.cc | |
parent | cba0f9f7a7c9066011f305fa92403755f0adab9c (diff) |
fix warning in UIcmd_save()
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r-- | src/uicmd.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index 153d5fb4..f08c7e70 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -901,17 +901,10 @@ static int UIcmd_save_file_check(const char *name) static void UIcmd_save(BrowserWindow *bw, const DilloUrl *url, const char *title) { - const char *name; - bool_t first_prompt = 1; + char *SuggestedName = UIcmd_make_save_filename(url); + while (1) { - char *SuggestedName; - - SuggestedName = - first_prompt - ? UIcmd_make_save_filename(url) - : dStrdup(name); - first_prompt = 0; - name = a_Dialog_save_file(title, NULL, SuggestedName); + const char *name = a_Dialog_save_file(title, NULL, SuggestedName); dFree(SuggestedName); if (name) { @@ -932,6 +925,8 @@ static void UIcmd_save(BrowserWindow *bw, const DilloUrl *url, } else { return; /* no name, so Abort */ } + + SuggestedName = dStrdup(name); } } |