Rizin
unix-like reverse engineering framework and cli tools
zip_source_rollback_write.c File Reference
#include "zipint.h"

Go to the source code of this file.

Functions

ZIP_EXTERN void zip_source_rollback_write (zip_source_t *src)
 

Function Documentation

◆ zip_source_rollback_write()

ZIP_EXTERN void zip_source_rollback_write ( zip_source_t src)

Definition at line 39 of file zip_source_rollback_write.c.

39  {
40  if (src->write_state != ZIP_SOURCE_WRITE_OPEN && src->write_state != ZIP_SOURCE_WRITE_FAILED) {
41  return;
42  }
43 
45  src->write_state = ZIP_SOURCE_WRITE_CLOSED;
46 }
lzma_index * src
Definition: index.h:567
#define NULL
Definition: cris-opc.c:27
@ ZIP_SOURCE_ROLLBACK_WRITE
Definition: zip.h:230
zip_int64_t _zip_source_call(zip_source_t *src, void *data, zip_uint64_t length, zip_source_cmd_t command)
@ ZIP_SOURCE_WRITE_CLOSED
Definition: zipint.h:376
@ ZIP_SOURCE_WRITE_OPEN
Definition: zipint.h:377
@ ZIP_SOURCE_WRITE_FAILED
Definition: zipint.h:378

References _zip_source_call(), NULL, src, ZIP_SOURCE_ROLLBACK_WRITE, ZIP_SOURCE_WRITE_CLOSED, ZIP_SOURCE_WRITE_FAILED, and ZIP_SOURCE_WRITE_OPEN.

Referenced by copy_source(), zip_close(), zip_source_free(), and zip_source_remove().