X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fhexencode-test.c;h=2d19ae891e6082051b39269adfe17c6b939909c2;hb=HEAD;hp=433625e7620f678e89410b6b2b3ad28f825ccbdd;hpb=d5853102f67d85d8e169f9dbe973ad573306c215;p=debian%2Famanda diff --git a/common-src/hexencode-test.c b/common-src/hexencode-test.c index 433625e..2d19ae8 100644 --- a/common-src/hexencode-test.c +++ b/common-src/hexencode-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) Zmanda Inc. All Rights Reserved. * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -23,13 +24,13 @@ #include "testutils.h" #include "simpleprng.h" -static int test_encode(void); -static int test_decode(void); -static int test_roundtrip(void); -static int test_roundtrip_rand(void); +static gboolean test_encode(void); +static gboolean test_decode(void); +static gboolean test_roundtrip(void); +static gboolean test_roundtrip_rand(void); typedef struct {char *in; char *out;} enc_vec; -static int +static gboolean test_encode(void) { static const enc_vec test_strs[] = { @@ -41,7 +42,8 @@ test_encode(void) {"\nhi\n", "%0ahi%0a"} }; static const int num = sizeof(test_strs)/sizeof(enc_vec); - int i, ret; + int i; + gboolean ret; char *tmp; ret = TRUE; @@ -60,7 +62,7 @@ test_encode(void) } typedef struct {char *in; char *out; gboolean expect_err; } dec_vec; -static int +static gboolean test_decode(void) { static const dec_vec test_strs[] = { @@ -80,7 +82,8 @@ test_decode(void) {"%00", "", TRUE} }; static const int num = sizeof(test_strs)/sizeof(dec_vec); - int i, ret; + int i; + gboolean ret; char *tmp; GError *err = NULL; @@ -104,7 +107,7 @@ test_decode(void) } typedef char* round_vec; -static int +static gboolean test_roundtrip(void) { static const round_vec test_strs[] = { @@ -117,7 +120,8 @@ test_roundtrip(void) "h%" }; static const int num = sizeof(test_strs)/sizeof(round_vec); - int i, ret; + int i; + gboolean ret; char *tmp_enc = NULL, *tmp_dec = NULL; GError *err = NULL; @@ -140,10 +144,11 @@ test_roundtrip(void) return ret; } -static int +static gboolean test_roundtrip_rand(void) { - int i, ret; + int i; + gboolean ret; simpleprng_state_t state; char *in, *tmp_enc = NULL, *tmp_dec = NULL; size_t size;