diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2014-02-09 13:51:38 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2014-02-09 13:51:38 +0100 |
commit | 828f125ee5957ee3f64d45329f5ac261a2a3c1a7 (patch) | |
tree | 7cb2c2433a4fae20f660dd60819350034ea1ebeb /samsung-ipc/gen.c | |
parent | 6cb0b59e3f0a7b8f2c9690b7e8d171d88d000270 (diff) | |
download | external_libsamsung-ipc-828f125ee5957ee3f64d45329f5ac261a2a3c1a7.zip external_libsamsung-ipc-828f125ee5957ee3f64d45329f5ac261a2a3c1a7.tar.gz external_libsamsung-ipc-828f125ee5957ee3f64d45329f5ac261a2a3c1a7.tar.bz2 |
Consistent coding style in helpers
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/gen.c')
-rw-r--r-- | samsung-ipc/gen.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/samsung-ipc/gen.c b/samsung-ipc/gen.c index 6db041b..93eaeaa 100644 --- a/samsung-ipc/gen.c +++ b/samsung-ipc/gen.c @@ -1,7 +1,7 @@ /* * This file is part of libsamsung-ipc. * - * Copyright (C) 2011 Paul Kocialkowsk <contact@paulk.fr> + * Copyright (C) 2011-2014 Paul Kocialkowsk <contact@paulk.fr> * * libsamsung-ipc is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,20 +21,15 @@ #include <samsung-ipc.h> -int ipc_gen_phone_res_check(struct ipc_gen_phone_res_data *res) +int ipc_gen_phone_res_check(const struct ipc_gen_phone_res_data *data) { - if (res == NULL) + if (data == NULL) return -1; - switch(res->code) - { - case 0x8000: - return 0; - case 0x8001: - return 0; - default: - return -1; - } + if (data->code & IPC_GEN_PHONE_RES_CODE_SUCCESS) + return 0; + + return -1; } // vim:ts=4:sw=4:expandtab |