A generic touchscreen calibration program for X.Org
Revision | 2a6d6185b1eabc1f2628655d6f2a9e3e4218928e (tree) |
---|---|
Time | 2010-01-08 07:12:36 |
Author | Tias Guns <tias@ulys...> |
Commiter | Tias Guns |
use strdup() due to pointer scope autofree [Thanks Sam Lin]
@@ -902,7 +902,7 @@ CalibrationArea::CalibrationArea (int argc, char** argv) | ||
902 | 902 | int xi_opcode, event, error; |
903 | 903 | |
904 | 904 | int found = 0; |
905 | - const char* drivername = ""; | |
905 | + const char* drivername = NULL; | |
906 | 906 | int min_x = 0, max_x = 0; |
907 | 907 | int min_y = 0, max_y = 0; |
908 | 908 |
@@ -938,7 +938,7 @@ CalibrationArea::CalibrationArea (int argc, char** argv) | ||
938 | 938 | !(ax[1].min_value == -1 && ax[1].max_value == -1)) { |
939 | 939 | /* a calibratable device (no mouse etc) */ |
940 | 940 | found++; |
941 | - drivername = list->name; | |
941 | + drivername = strdup(list->name); | |
942 | 942 | min_x = ax[0].min_value; |
943 | 943 | max_x = ax[0].max_value; |
944 | 944 | min_y = ax[1].min_value; |