From 3c8103dbb9e9577ae3a6070d2f97064e64e576ed Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 00:23:15 -0500 Subject: 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 --- (limited to 'libopkg') 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) -- cgit v0.9.1