]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
Rename boolean variable names.
authorThibault Godouet <yo8192@users.noreply.github.com>
Sat, 24 Aug 2024 15:44:49 +0000 (16:44 +0100)
committerThibault Godouet <yo8192@users.noreply.github.com>
Sat, 24 Aug 2024 20:51:44 +0000 (21:51 +0100)
fcrondyn_svr.c
fileconf.c

index 11e74757cf038e5155eab73166a6ccd120c8bf9f..d7069e7d14968e583e47c7754bfa87df7c48f39f 100644 (file)
@@ -251,9 +251,7 @@ auth_client_so_peercred(struct fcrondyn_cl *client)
      * Sets client->fcl_user on success, don't do anything on failure
      * so that the client stays unauthenticated */
 {
-    /* [@PR #17] renamed (previously called 'true') to avoid conflict with
-       stdbool */
-    const int value = 1;
+    const int true_val = 1;
     /* There is no ucred.h (or equivalent) on linux to define struct ucred (!!)
      * so we do it here */
 #if ! ( defined(HAVE_CRED_H) && defined(HAVE_UCRED_H) \
@@ -268,8 +266,8 @@ auth_client_so_peercred(struct fcrondyn_cl *client)
     socklen_t cred_size = sizeof(cred);
     struct passwd *p_entry = NULL;
 
-    setsockopt(client->fcl_sock_fd, SOL_SOCKET, SO_PASSCRED, &value,
-               sizeof(value));
+    setsockopt(client->fcl_sock_fd, SOL_SOCKET, SO_PASSCRED, &true_val,
+               sizeof(true_val));
     if (getsockopt
         (client->fcl_sock_fd, SOL_SOCKET, SO_PEERCRED, &cred,
          &cred_size) != 0) {
index 99b7923853e0ccc719da265caa1d0d92b48ff96e..f7c6539b3176ab4cd5bfba75020ab674544d56cb 100644 (file)
@@ -458,42 +458,40 @@ assign_option_string(char **var, char *value)
 }
 
 
-/* [@PR #17] renamed labels 'true' and 'false' to avoid conflict with
-   stdbool */
 char *
 get_bool(char *ptr, int *i)
     /* get a bool value : either true (1) or false (0)
      * return NULL on error */
 {
     if (*ptr == '1')
-        goto conf_true;
+        goto true_val;
     else if (*ptr == '0')
-        goto conf_false;
+        goto false_val;
     else if (strncmp(ptr, "true", 4) == 0) {
         ptr += 3;
-        goto conf_true;
+        goto true_val;
     }
     else if (strncmp(ptr, "yes", 3) == 0) {
         ptr += 2;
-        goto conf_true;
+        goto true_val;
     }
     else if (strncmp(ptr, "false", 5) == 0) {
         ptr += 4;
-        goto conf_false;
+        goto false_val;
     }
     else if (strncmp(ptr, "no", 2) == 0) {
         ptr += 1;
-        goto conf_false;
+        goto false_val;
     }
     else
         return NULL;
 
conf_true:
true_val:
     *i = true;
     ptr++;
     return ptr;
 
conf_false:
false_val:
     *i = false;
     ptr++;
     return ptr;