summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:23:15 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:23:15 (EST)
commit3c8103dbb9e9577ae3a6070d2f97064e64e576ed (patch)
treec0ad2887f0a733cffde65c001d462a73e40d9974
parent4811b041bc4792c6dbdbe9e79d192048b1939982 (diff)
opkg: let args_init return 0 is successful
returns errno if some error happens git-svn-id: http://opkg.googlecode.com/svn/trunk@135 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/args.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libopkg/args.c b/libopkg/args.c
index 495f1a8..564e05c 100644
--- a/libopkg/args.c
+++ b/libopkg/args.c
@@ -49,6 +49,9 @@ int args_init(args_t *args)
{
char *conf_file_dir;
+ if (!args) {
+ return EFAULT;
+ }
memset(args, 0, sizeof(args_t));
args->dest = ARGS_DEFAULT_DEST;
@@ -78,7 +81,7 @@ int args_init(args_t *args)
args->nocheckfordirorfile = 0;
args->noreadfeedsfile = 0;
- return 1;
+ return 0;
}
void args_deinit(args_t *args)