diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h index 055528b..062d330 100644 --- a/protoc-c/c_helpers.h +++ b/protoc-c/c_helpers.h @@ -175,14 +175,10 @@ int compare_name_indices_by_name(const void*, const void*); // Return the syntax version of the file containing the field. // This wrapper is needed to be able to compile against protobuf2. inline int FieldSyntax(const FieldDescriptor* field) { -#ifdef HAVE_PROTO3 -# if GOOGLE_PROTOBUF_VERSION >= 4023000 +#if GOOGLE_PROTOBUF_VERSION >= 4023000 return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2; -# else - return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; -# endif #else - return 2; + return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; #endif }