for (; *walk != '\0'; walk++) {
if (*walk != '%') {
*(outwalk++) = *walk;
- continue;
- }
- if (BEGINS_WITH(walk + 1, "%")) {
+
+ } else if (BEGINS_WITH(walk + 1, "%")) {
outwalk += sprintf(outwalk, "%s", pct_mark);
walk += strlen("%");
- }
- if (BEGINS_WITH(walk + 1, "volume")) {
+
+ } else if (BEGINS_WITH(walk + 1, "volume")) {
outwalk += sprintf(outwalk, "%d%s", ivolume, pct_mark);
walk += strlen("volume");
+
+ } else {
+ *(outwalk++) = '%';
}
}
return outwalk;
free(instance);
}
-#ifndef __OpenBSD__
+#if !defined(__DragonFly__) && !defined(__OpenBSD__)
/* Try PulseAudio first */
/* If the device name has the format "pulse[:N]" where N is the