add: fix segfault when no params are given
parent
0906a1c7de
commit
651aa71ac2
|
@ -60,7 +60,8 @@ static int add_main(void *ctx, int argc, char **argv)
|
||||||
struct apk_dependency virtdep;
|
struct apk_dependency virtdep;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
if (strcmp(argv[0], "starwars") == 0)
|
if ((argc > 0) && (apk_verbosity > 1) &&
|
||||||
|
(strcmp(argv[0], "starwars") == 0))
|
||||||
return system("telnet towel.blinkenlights.nl");
|
return system("telnet towel.blinkenlights.nl");
|
||||||
|
|
||||||
r = apk_db_open(&db, apk_root, actx->open_flags | APK_OPENF_WRITE);
|
r = apk_db_open(&db, apk_root, actx->open_flags | APK_OPENF_WRITE);
|
||||||
|
|
Loading…
Reference in New Issue