diff options
author | kotontrion <[email protected]> | 2024-06-16 18:50:09 +0200 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-06-16 18:50:09 +0200 |
commit | b35a38aa93670f6be06202f2ad3066a227f0a1b9 (patch) | |
tree | 1c51be4ed5c53202d11017508b5604b39db4ffef /examples/simple_example.c | |
parent | 33b3b60ee513ce2d313ce31c292afc114a110eb3 (diff) |
fix code style
Diffstat (limited to 'examples/simple_example.c')
-rw-r--r-- | examples/simple_example.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/simple_example.c b/examples/simple_example.c index 257c2fe..e11b5f9 100644 --- a/examples/simple_example.c +++ b/examples/simple_example.c @@ -1,11 +1,10 @@ #include <bsd/readpassphrase.h> + #include "auth.h" GMainLoop *loop; -void ready_callback(AstalAuthPam *pam, - GAsyncResult *res, - gpointer user_data) { +void ready_callback(AstalAuthPam *pam, GAsyncResult *res, gpointer user_data) { GError *error = NULL; astal_auth_pam_authenticate_finish(res, &error); if (error == NULL) { @@ -19,16 +18,12 @@ void ready_callback(AstalAuthPam *pam, } int main(void) { - GMainContext *loopctx = NULL; loop = g_main_loop_new(loopctx, FALSE); gchar *passbuf = calloc(1024, sizeof(gchar)); readpassphrase("Password: ", passbuf, 1024, RPP_ECHO_OFF); - astal_auth_pam_authenticate(passbuf, - (GAsyncReadyCallback) ready_callback, - NULL - ); + astal_auth_pam_authenticate(passbuf, (GAsyncReadyCallback)ready_callback, NULL); g_free(passbuf); g_main_loop_run(loop); |