diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2016-12-23 18:53:29 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2016-12-23 18:53:48 +0100 |
commit | 01751a734789257a714193140527ea7ecae01ccf (patch) | |
tree | 69b01202d84bed9b86374727858440912d1a0c7d | |
parent | f98954b981571c28d433f32d685d29e507bfccb0 (diff) | |
download | libgphoto2-01751a734789257a714193140527ea7ecae01ccf.tar.gz |
max was undefined
-rw-r--r-- | camlibs/ptp2/library.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 75ec47830..b24e8dc37 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -5159,6 +5159,11 @@ nikon_curve_put (CameraFilesystem *fs, const char *folder, CameraFile *file, return (GP_OK); } +static int ptp_max(int a, int b) { + if (a > b) return a; + return b; +} + static int camera_summary (Camera* camera, CameraText* summary, GPContext *context) { @@ -5173,7 +5178,7 @@ camera_summary (Camera* camera, CameraText* summary, GPContext *context) txt = summary->text; -#define SPACE_LEFT max(0, summary->text + sizeof (summary->text) - txt) +#define SPACE_LEFT ptp_max(0, summary->text + sizeof (summary->text) - txt) #define APPEND_TXT( ... ) txt += snprintf (txt, SPACE_LEFT, __VA_ARGS__) APPEND_TXT (_("Manufacturer: %s\n"),params->deviceinfo.Manufacturer); |