summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fc4c6a6)
As opposed to blindly proceeding with a nonsense filename...
struct upkg *upkg = U_PKG(pkg)->pkg;
char name[256];
FILE *of;
struct upkg *upkg = U_PKG(pkg)->pkg;
char name[256];
FILE *of;
if (u_object_deserialize(obj, upkg, idx) != 0) {
return -1;
if (u_object_deserialize(obj, upkg, idx) != 0) {
return -1;
- u_object_export_name(obj, name, sizeof name);
+ rc = u_object_export_name(obj, name, sizeof name);
+ if (rc <= 0) {
+ /* XXX: We could use a default name here. */
+ fprintf(stderr, "%s: failed to determine export filename.\n",
+ progname);
+ return -1;
+ }
printf("exporting ");
export_print_fullname(pkg, upkg_get_export(upkg, idx));
printf("exporting ");
export_print_fullname(pkg, upkg_get_export(upkg, idx));