• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Revision2a6d6185b1eabc1f2628655d6f2a9e3e4218928e (tree)
Time2010-01-08 07:12:36
AuthorTias Guns <tias@ulys...>
CommiterTias Guns

Log Message

use strdup() due to pointer scope autofree [Thanks Sam Lin]

Change Summary

Incremental Difference

--- a/xinput_calibrator.cc
+++ b/xinput_calibrator.cc
@@ -902,7 +902,7 @@ CalibrationArea::CalibrationArea (int argc, char** argv)
902902 int xi_opcode, event, error;
903903
904904 int found = 0;
905- const char* drivername = "";
905+ const char* drivername = NULL;
906906 int min_x = 0, max_x = 0;
907907 int min_y = 0, max_y = 0;
908908
@@ -938,7 +938,7 @@ CalibrationArea::CalibrationArea (int argc, char** argv)
938938 !(ax[1].min_value == -1 && ax[1].max_value == -1)) {
939939 /* a calibratable device (no mouse etc) */
940940 found++;
941- drivername = list->name;
941+ drivername = strdup(list->name);
942942 min_x = ax[0].min_value;
943943 max_x = ax[0].max_value;
944944 min_y = ax[1].min_value;