Skip to content

Commit 22f8fba

Browse files
committed
Avoid double make strings (Make Make Model)
1 parent 25bf392 commit 22f8fba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/dnssd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DNS-SD discovery backend for CUPS.
33
//
4-
// Copyright © 2020-2024 by OpenPrinting.
4+
// Copyright © 2020-2025 by OpenPrinting.
55
// Copyright © 2008-2018 by Apple Inc.
66
//
77
// Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -666,7 +666,7 @@ query_callback(
666666
if (device->make_and_model)
667667
free(device->make_and_model);
668668

669-
if (make_and_model[0])
669+
if (make_and_model[0] && strncmp(make_and_model, model, strlen(make_and_model)))
670670
{
671671
cupsConcatString(make_and_model, " ", sizeof(make_and_model));
672672
cupsConcatString(make_and_model, model, sizeof(make_and_model));

0 commit comments

Comments
 (0)