]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use xpc_dictionary_create_empty to create empty dictionaries 1056/head
authorRose <gfunni234@gmail.com>
Fri, 20 Sep 2024 21:25:37 +0000 (17:25 -0400)
committerRose <gfunni234@gmail.com>
Fri, 20 Sep 2024 21:25:50 +0000 (17:25 -0400)
xpc_dictionary_create has Nonnull annotated for some of its parameters. We should just do xpc_dictionary_create_empty to avoid warnings and be safe.

backend/ipp.c

index 23255b71d05aa96af882f2691dfe1e20f3437e4f..9f783b85988411aa66e172a469e68864d7254e3a 100644 (file)
@@ -3352,7 +3352,7 @@ run_as_user(char       *argv[],           /* I - Command-line arguments */
   * Try starting the backend...
   */
 
-  request = xpc_dictionary_create(NULL, NULL, 0);
+  request = xpc_dictionary_create_empty();
   xpc_dictionary_set_int64(request, "command", kPMStartJob);
   xpc_dictionary_set_string(request, "device-uri", device_uri);
   xpc_dictionary_set_string(request, "job-id", argv[1]);
@@ -3405,7 +3405,7 @@ run_as_user(char       *argv[],           /* I - Command-line arguments */
   * Then wait for the backend to finish...
   */
 
-  request = xpc_dictionary_create(NULL, NULL, 0);
+  request = xpc_dictionary_create_empty();
   xpc_dictionary_set_int64(request, "command", kPMWaitForJob);
   xpc_dictionary_set_fd(request, "stderr", 2);