use httpAssembleURI not httpAssembleURIf
ClosedPublic

Authored by sitter on Apr 1 2020, 10:37 AM.

Details

Summary

the latter is for when the last argument is a format string. which I
believe is not the case here. or perhaps more importantly if it was a
format string it'd be an invalid call because we pass no values in

Test Plan
  • make two printers
  • pause them
  • print job to one printer
  • open printer queue
  • right click job to move to other printer
  • job is now on other printer

Diff Detail

Repository
R363 Print Manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Apr 1 2020, 10:37 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptApr 1 2020, 10:37 AM
sitter requested review of this revision.Apr 1 2020, 10:37 AM

I take it the library isn't actually api-stable? So we could also change that function name, it should really be assembleUri given the arguments.

Oh and FWIW, this fixes build problems on debian where -Werror=format-security is set by default (and consequently tripping over format strings without arguments).

dantti added a comment.Apr 1 2020, 1:59 PM

LGTM, is the new function available since old CUPS versions? Just to make sure it won't break usage with old versions.

sitter added a comment.Apr 1 2020, 2:04 PM

LGTM, is the new function available since old CUPS versions? Just to make sure it won't break usage with old versions.

Yep, they are both API version 1.2 https://opensource.apple.com/source/cups/cups-450/cups/doc/help/api-httpipp.html#httpAssembleURI

dantti accepted this revision.Apr 1 2020, 2:23 PM
This revision is now accepted and ready to land.Apr 1 2020, 2:23 PM
This revision was automatically updated to reflect the committed changes.