Two algorithms for finding bridges in a graph that are almost the same

So I'm looking at an algorithm for finding bridges in an undirected graph. The thing is, there is a version of this algorithm that I've used so far that looks like this (C++)

void DFS(int u){
//link and low link are vectors that hold the link and low link value
//for each node,'time' is initialized at zero.
visited[u] = true;

if(!visited[neighbour]){
parent[neighbour] = u;

DFS(neighbour);

//found the bridge
}

}else if(neighbour != parent[u]){

}

}

}

However I've stumbled upon an algorithm that's almost exactly the same as this one except for one small detail. In the else if branch of the first if statement (when determined that the neighbour node is already visited but not the parent of the current node) instead of
{"ft_lang_label":"__label__en","ft_lang_prob":0.9476139,"math_prob":0.964065,"size":1651,"snap":"2019-43-2019-47","text_gpt3_token_len":403,"char_repetition_ratio":0.17729205,"word_repetition_ratio":0.0,"special_character_ratio":0.25681406,"punctuation_ratio":0.094936706,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9702064,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-15T11:11:06Z\",\"WARC-Record-ID\":\"<urn:uuid:9483fc0c-b1cd-47cb-8554-c7b04f11fddd>\",\"Content-Length\":\"127574\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1ed486fc-c936-4141-87d7-bf4519c628be>\",\"WARC-Concurrent-To\":\"<urn:uuid:d278522f-70de-4c25-9566-346c757749ae>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://cs.stackexchange.com/questions/113449/two-algorithms-for-finding-bridges-in-a-graph-that-are-almost-the-same\",\"WARC-Payload-Digest\":\"sha1:GI7JOMWTYRHIREPMNHPRUWCZ37VL2ZGH\",\"WARC-Block-Digest\":\"sha1:5KW5CS6IBV3AWNJK6K7CZ7JM6FLK77SX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570986658566.9_warc_CC-MAIN-20191015104838-20191015132338-00458.warc.gz\"}"}