protocol/mhproto_client.cpp
void MhProtoClient::createError(const char *file) {
    int fd = open(file, O_WRONLY);

    if (fd == -1) {
        perror("Fail to open file for test.");
        exit(1);
    }

    write(fd, "Error", strlen("Error"));

    close(fd);
}
/** Corrupt file for test purposes.
 */
Corrupt file for test purposes.
Corrupt file for test purposes .
void MhProtoClient::createError(const char *file) {
    int fd = open(file, O_WRONLY);
    if (fd == -1) {
        perror("Fail to open file for test.");
        exit(1);
    }
    write(fd, "Error", strlen("Error"));
    close(fd);
}
void MhProtoClient :: createError ( const char * file ) { int fd = open ( file , O_WRONLY ) ; if ( fd == -1 ) { perror ( " " ) ; exit ( 1 ) ; } write ( fd , " " , strlen ( " " ) ) ; close ( fd ) ; }
Corrupt file for test purposes.
Corrupt file for test purposes .