diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-11-29 23:54:01 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-11-29 23:54:01 +0100 |
commit | 9a8214e0304a1dffe0a321d96d01045cfc34c8e8 (patch) | |
tree | 3a92b0f6de06290f6471eb30821faef6ea14bed6 /src/dns.c | |
parent | 73ede020c76126e81325fcd8d3e186132db21198 (diff) | |
download | dns-9a8214e0304a1dffe0a321d96d01045cfc34c8e8.tar.gz |
asdf
Diffstat (limited to 'src/dns.c')
-rw-r--r-- | src/dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ int fqdn_to_qname( char* _source, int _sourcelen, char* _sink ,int _sinklen ) { // TODO Opttimize - int i = 0; + int i; int lastdot = 0; if (_sourcelen < 1 || _sinklen < 1) @@ -11,11 +11,10 @@ int fqdn_to_qname( char* _source, int _sourcelen, char* _sink ,int _sinklen ) _sink[0] = ' '; //Set to known value - while ( (i < _sourcelen) && (i < (_sinklen - 1))) { //Copy offset 1 + for(i = 0; ((i < _sourcelen) && (i < (_sinklen - 1))); i++) { //Copy offset 1 if(! _source[i]) break; _sink[i+1] = _source[i]; - i++; } if( _source[i] ) // _source not terminated @@ -34,6 +33,7 @@ int fqdn_to_qname( char* _source, int _sourcelen, char* _sink ,int _sinklen ) return i+2; } + int qname_to_fqdn( char* _source, int _sourcelen, char* _sink, int _sinklen ) { return -1; |