remove unnessecary strdup

This commit is contained in:
Jarcode
2019-03-14 21:57:26 -07:00
parent 0acf7d4188
commit 06644549e2
3 changed files with 3 additions and 3 deletions

View File

@@ -306,7 +306,7 @@ int main(int argc, char** argv) {
} }
after: after:
if (sep >= 0) { if (sep >= 0) {
parsed_type = strdup(optarg + sep + 1); parsed_type = optarg + sep + 1;
optarg[sep] = '\0'; optarg[sep] = '\0';
} }
parsed_name = optarg; parsed_name = optarg;

View File

@@ -489,7 +489,7 @@ void ext_process(struct glsl_ext* ext, const char* f) {
for (size_t p = 0; p < bbuf_idx; ++p) for (size_t p = 0; p < bbuf_idx; ++p)
if (bbuf[p] == ':') sep = p; if (bbuf[p] == ':') sep = p;
if (sep >= 0) { if (sep >= 0) {
parsed_default = strdup(bbuf + sep + 1); parsed_default = bbuf + sep + 1;
bbuf[sep] = '\0'; bbuf[sep] = '\0';
} }
parsed_name = bbuf; parsed_name = bbuf;

View File

@@ -20,7 +20,7 @@
/* Bar color changes with height */ /* Bar color changes with height */
#define GRADIENT (d / GRADIENT_POWER + 1) #define GRADIENT (d / GRADIENT_POWER + 1)
/* Bar color */ /* Bar color */
#define COLOR (#3366b2 * GRADIENT) #define COLOR (@fg:#3366b2 * GRADIENT)
/* Direction that the bars are facing, 0 for inward, 1 for outward */ /* Direction that the bars are facing, 0 for inward, 1 for outward */
#define DIRECTION 0 #define DIRECTION 0
/* Whether to switch left/right audio buffers */ /* Whether to switch left/right audio buffers */