couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [08/15] git commit: Attempting to avoid a compiler warning on Jenkins
Date Mon, 04 Aug 2014 18:06:46 GMT
Attempting to avoid a compiler warning on Jenkins


Project: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/commit/edaf27bc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/tree/edaf27bc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/diff/edaf27bc

Branch: refs/heads/windsor-merge
Commit: edaf27bc96c9384558df4742e77a8bf85d989eda
Parents: 41f00c4
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Nov 21 15:29:13 2013 -0600
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Thu Nov 21 15:29:13 2013 -0600

----------------------------------------------------------------------
 c_src/b64url.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-b64url/blob/edaf27bc/c_src/b64url.c
----------------------------------------------------------------------
diff --git a/c_src/b64url.c b/c_src/b64url.c
index 0bc6ab8..3528d3b 100644
--- a/c_src/b64url.c
+++ b/c_src/b64url.c
@@ -546,28 +546,32 @@ b64url_decode_cont(ErlNifEnv* env, int argc, const ENTERM argv[])
     int status;
 
     if(argc != 2) {
-        return enif_make_badarg(env);
+        goto badarg;
     }
 
     if(!enif_inspect_iolist_as_binary(env, argv[0], &src)) {
-        return enif_make_badarg(env);
+        goto badarg;
     }
 
     if(!enif_get_resource(env, argv[1], priv->res_st, (void**) &st)) {
-        return enif_make_badarg(env);
+        goto badarg;
     }
 
     if(!check_pid(env, st)) {
-        return enif_make_badarg(env);
+        goto badarg;
     }
 
     if(src.size != st->len) {
-        return enif_make_badarg(env);
+        goto badarg;
     }
 
     status = b64url_decode(env, &src, st, &ret);
 
     return b64url_st_dec_ret(env, st, status, ret);
+
+badarg:
+    ret = enif_make_badarg(env);
+    return ret;
 }
 
 


Mime
View raw message