]> git.sur5r.net Git - i3/i3/commitdiff
Fix redundant casts to the same type
authorOrestis Floros <orestisf1993@gmail.com>
Thu, 26 Apr 2018 21:08:58 +0000 (00:08 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Thu, 26 Apr 2018 21:09:42 +0000 (00:09 +0300)
Found using clang-tidy's google-readability-casting.

i3-nagbar/main.c
libi3/ucs2_conversion.c
src/startup.c

index e4628e303452feae75294e0de9208cc26ba5bc8e..3e5f43e367ef6018b460daa337ef220c7b965ee8 100644 (file)
@@ -115,7 +115,7 @@ static void start_application(const char *command) {
         setsid();
         if (fork() == 0) {
             /* This is the child */
-            execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL);
+            execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL);
             /* not reached */
         }
         exit(0);
index 75cff78adbdf4a5739da0834438d3c792105eb0c..398c1ae58112566da771035a578ce222f99d2a8e 100644 (file)
@@ -83,8 +83,7 @@ xcb_char2b_t *convert_utf8_to_ucs2(char *input, size_t *real_strlen) {
     }
 
     /* Do the conversion */
-    size_t rc = iconv(ucs2_conversion_descriptor, (char **)&input,
-                      &input_size, (char **)&output, &output_size);
+    size_t rc = iconv(ucs2_conversion_descriptor, &input, &input_size, (char **)&output, &output_size);
     if (rc == (size_t)-1) {
         perror("Converting to UCS-2 failed");
         free(buffer);
index 1e733fcb8670399abf991954d368d7df869f904a..b1a2f60215550d9585a7f24efbebb243e2c672cd 100644 (file)
@@ -191,7 +191,7 @@ void start_application(const char *command, bool no_startup_id) {
             if (!no_startup_id)
                 sn_launcher_context_setup_child_process(context);
 
-            execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL);
+            execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL);
             /* not reached */
         }
         _exit(0);