OSDN Git Service

[Refactor] #38997 'while (1)' を 'while (TRUE)' に変更 / Changed 'while (1)' to 'while...
[hengband/hengband.git] / src / files.c
index c600abb..11c9abc 100644 (file)
@@ -5757,13 +5757,14 @@ void do_cmd_help(void)
 /*!
  * @brief プレイヤーの名前をチェックして修正する
  * Process the player name.
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @param sf セーブファイル名に合わせた修正を行うならばTRUE
  * @return なし
  * @details
  * Extract a clean "base name".
  * Build the savefile name if needed.
  */
-void process_player_name(bool sf)
+void process_player_name(player_type *creature_ptr, bool sf)
 {
        int i, k = 0;
        char old_player_base[32] = "";
@@ -5871,7 +5872,7 @@ void process_player_name(bool sf)
        {
                concptr s;
                s = savefile;
-               while (1)
+               while (TRUE)
                {
                        concptr t;
                        t = my_strstr(s, PATH_SEP);
@@ -5905,7 +5906,7 @@ void process_player_name(bool sf)
        /* Load an autopick preference file */
        if (current_world_ptr->character_generated)
        {
-               if (!streq(old_player_base, p_ptr->base_name)) autopick_load_pref(FALSE);
+               if (!streq(old_player_base, p_ptr->base_name)) autopick_load_pref(creature_ptr, FALSE);
        }
 }
 
@@ -6737,7 +6738,7 @@ static errr counts_seek(int fd, u32b where, bool flag)
                temp1[i] ^= (i+1) * 63;
 
        seekpoint = 0;
-       while (1)
+       while (TRUE)
        {
                if (fd_seek(fd, seekpoint + 3 * sizeof(u32b)))
                        return 1;