mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
utils: Uniform the no-devices error messages removing duplicated checks
Use error messages to be consistent, and avoid checking for a returned value when dbus-glib function to fetch it returned false, as it's implicit that we had a failure. Otherwise if didn't fail we are sure that we got the requested value.
This commit is contained in:
@ -89,12 +89,12 @@ static void process_devices(char **argv)
|
||||
guint i;
|
||||
|
||||
if (!net_reactivated_Fprint_Manager_get_devices(manager, &devices, &error)) {
|
||||
g_print("list_devices failed: %s\n", error->message);
|
||||
g_print("Impossible to get devices: %s\n", error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (devices->len == 0) {
|
||||
g_print("No devices found\n");
|
||||
g_print("No devices available\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user