Refactoring ported patch for fate#308978

Removed useless Convert (added during conversion from ycp).

Replaced temporary variables tmp1, tmp2 using one in DNS::Write.