This rolls together two earlier patchsets. First, the 3 patches to the remaining strtol calls look more consistent. Second, the implementation for the safe_strtoint() call. Tacked on are some test cases inspired by work by Imran Zaman a couple years ago.
These patches could be squashed together for landing, but are left split out for ease of review. Bryce Harrington (5): Standardize error checking for strtol calls xwayland: Improve error checking for strtol call option-parser: Improve error checking for strtol call Add safe_strtoint() helper shared: Test cases for safe_strtoint() Makefile.am | 7 ++++ compositor/main.c | 6 ++-- compositor/systemd-notify.c | 9 ++--- libweston/compositor.c | 8 ++--- libweston/libbacklight.c | 13 +++++-- shared/config-parser.c | 7 ++-- shared/option-parser.c | 12 +++++-- shared/string-helpers.h | 78 ++++++++++++++++++++++++++++++++++++++++ tests/string-test.c | 87 +++++++++++++++++++++++++++++++++++++++++++++ xwayland/launcher.c | 6 ++-- 10 files changed, 205 insertions(+), 28 deletions(-) create mode 100644 shared/string-helpers.h create mode 100644 tests/string-test.c -- 1.9.1 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel