r4491 - trunk/src/target/opkg/libopkg

tick at docs.openmoko.org tick at docs.openmoko.org
Sat Jun 21 17:11:10 CEST 2008


Author: tick
Date: 2008-06-21 17:11:09 +0200 (Sat, 21 Jun 2008)
New Revision: 4491

Modified:
   trunk/src/target/opkg/libopkg/args.c
Log:
 opkg: let args_init return 0 is successful 
	returns errno if some error happens


Modified: trunk/src/target/opkg/libopkg/args.c
===================================================================
--- trunk/src/target/opkg/libopkg/args.c	2008-06-19 02:26:20 UTC (rev 4490)
+++ trunk/src/target/opkg/libopkg/args.c	2008-06-21 15:11:09 UTC (rev 4491)
@@ -49,6 +49,9 @@
 {
      char *conf_file_dir;
 
+     if (!args) {
+	  return EFAULT;
+     }
      memset(args, 0, sizeof(args_t));
 
      args->dest = ARGS_DEFAULT_DEST;
@@ -78,7 +81,7 @@
      args->nocheckfordirorfile = 0;
      args->noreadfeedsfile = 0;
 
-     return 1;
+     return 0;
 }
 
 void args_deinit(args_t *args)





More information about the commitlog mailing list