commit d1688ce08917f7071c7bbfc44ae27624c0a1efd8 from: Stefan Sperling date: Tue Feb 05 23:08:47 2019 UTC remove a pointless error code commit - b72f483a5d3d0699d6ff221cd44f8853eded0a32 commit + d1688ce08917f7071c7bbfc44ae27624c0a1efd8 blob - 3c5386e1a28c207eb5c07d3cbbe2ef72e0e7e38e blob + ca9b00397c9f4b9743440e020914a5be8ea662d7 --- include/got_error.h +++ include/got_error.h @@ -28,7 +28,7 @@ #define GOT_ERR_BAD_OBJ_HDR 10 #define GOT_ERR_OBJ_TYPE 11 #define GOT_ERR_BAD_OBJ_DATA 12 -#define GOT_ERR_FILE_OPEN 13 +/* 13 is currently free for re-use */ #define GOT_ERR_BAD_PACKIDX 14 #define GOT_ERR_PACKIDX_CSUM 15 #define GOT_ERR_BAD_PACKFILE 16 @@ -92,7 +92,7 @@ static const struct got_error { { GOT_ERR_BAD_OBJ_HDR, "bad object header" }, { GOT_ERR_OBJ_TYPE, "wrong type of object" }, { GOT_ERR_BAD_OBJ_DATA, "bad object data" }, - { GOT_ERR_FILE_OPEN, "could not open file" }, + { 13, "unused error code" }, { GOT_ERR_BAD_PACKIDX, "bad pack index file" }, { GOT_ERR_PACKIDX_CSUM, "pack index file checksum error" }, { GOT_ERR_BAD_PACKFILE, "bad pack file" }, blob - a3da580ba00997c724ca5eb3cd2126aab7442ebd blob + cefba42370c417b69460c1dcf59530a7dd5e05ab --- lib/diff.c +++ lib/diff.c @@ -54,7 +54,7 @@ diff_blobs(struct got_blob_object *blob1, struct got_b if (blob1) { f1 = got_opentemp(); if (f1 == NULL) - return got_error(GOT_ERR_FILE_OPEN); + return got_error_from_errno(); } else flags |= D_EMPTY1; @@ -62,7 +62,7 @@ diff_blobs(struct got_blob_object *blob1, struct got_b f2 = got_opentemp(); if (f2 == NULL) { fclose(f1); - return got_error(GOT_ERR_FILE_OPEN); + return got_error_from_errno(); } } else flags |= D_EMPTY2;