mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
normalize example exit status
Use EXIT_SUCCESS / EXIT_FAILURE in most cases as more granularity isn't useful. For anim_diff, use 0 (success), 1 (image difference) and 2 (error) to align it with other diff utilities (diff, etc.). Bug: webp:637 Change-Id: I52925de8622a5a4d2141883279d69a1d95ef9b12
This commit is contained in:
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "webp/decode.h"
|
||||
#include "webp/mux.h"
|
||||
#include "../examples/example_util.h"
|
||||
@ -1225,6 +1226,7 @@ static int Process(const Config* config) {
|
||||
//------------------------------------------------------------------------------
|
||||
// Main.
|
||||
|
||||
// Returns EXIT_SUCCESS on success, EXIT_FAILURE on failure.
|
||||
int main(int argc, const char* argv[]) {
|
||||
Config config;
|
||||
int ok;
|
||||
@ -1238,7 +1240,7 @@ int main(int argc, const char* argv[]) {
|
||||
PrintHelp();
|
||||
}
|
||||
DeleteConfig(&config);
|
||||
FREE_WARGV_AND_RETURN(!ok);
|
||||
FREE_WARGV_AND_RETURN(ok ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user