Simplify xbps_end() and don't continue if xbps_init() did not succeed.

This commit is contained in:
Juan RP
2012-01-17 16:56:17 +01:00
parent f2b05d6438
commit d0e1477eeb
6 changed files with 75 additions and 86 deletions

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2010-2011 Juan Romero Pardines.
* Copyright (c) 2010-2012 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -94,7 +94,7 @@ die(const char *fmt, ...)
vfprintf(stderr, fmt, ap);
fprintf(stderr, " (%s)\n", strerror(save_errno));
va_end(ap);
xbps_end(xbps_handle_get());
xbps_end();
exit(EXIT_FAILURE);
}