Jelajahi Sumber

ccmake: Factor clear line.

Nicolas Despres 14 tahun lalu
induk
melakukan
1dd43c4c9d
1 mengubah file dengan 5 tambahan dan 6 penghapusan
  1. 5 6
      Source/CursesDialog/cmCursesMainForm.cxx

+ 5 - 6
Source/CursesDialog/cmCursesMainForm.cxx

@@ -409,12 +409,11 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
   char thirdLine[512]="";
   if (process)
     {
-    sprintf(firstLine,
-            "                                                               ");
-    sprintf(secondLine,
-            "                                                               ");
-    sprintf(thirdLine,
-            "                                                               ");
+    const char* clearLine =
+      "                                                               ";
+    strcpy(firstLine, clearLine);
+    strcpy(secondLine, clearLine);
+    strcpy(thirdLine, clearLine);
     }
   else
     {