Skip to content

Commit f62ac39

Browse files
committed
astyle: pad operators
1 parent 1e20e65 commit f62ac39

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ install: $(EXE)
2929
install $(EXE) $(DESTDIR)/usr/bin
3030

3131
astyle:
32-
astyle --style=linux --indent=tab --unpad-paren --pad-header *.c *.h
32+
astyle --style=linux --indent=tab --unpad-paren --pad-header --pad-oper *.c *.h

fuse.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ gchar *filter_str(gchar *str)
99
{
1010
gchar *ch = strchr(str, '\n');
1111
if (ch)
12-
str[ch-str] = 0;
12+
str[ch - str] = 0;
1313
g_strstrip(str);
1414
return str;
1515
}
@@ -208,7 +208,7 @@ static int fsreaddir(const char *path, void *buf, fuse_fill_dir_t filler,
208208
filler(buf, "log", NULL, 0);
209209
filler(buf, "config", NULL, 0);
210210
if (roster && (connection_state == ONLINE)) {
211-
filler(buf, "roster",NULL, 0);
211+
filler(buf, "roster", NULL, 0);
212212
filler(buf, "rawxmpp", NULL, 0);
213213
}
214214
return 0;
@@ -377,7 +377,7 @@ static char *prepare_option(const char *option, const char *buf, size_t size)
377377

378378
// bool options
379379
if ((strcmp(option, "events") == 0) ||
380-
(strcmp(option, "raw_logs")== 0)) {
380+
(strcmp(option, "raw_logs") == 0)) {
381381
val = strdup("1"); // just something :)
382382
} else {
383383
val = filter_str(strndup(buf, size));
@@ -538,7 +538,7 @@ static int fsunlink(const char *path)
538538
}
539539
}
540540
// delete options from /config/, maybe need some checks before actual deleting
541-
if (strncmp(path, "/config/",8) == 0) {
541+
if (strncmp(path, "/config/", 8) == 0) {
542542
path += 8;
543543
g_hash_table_remove(config, path);
544544
}

hatexmpp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ gchar *eventstr(gchar *str) /* TODO const */
2525
logf("Event: fd_events = %d, str = %s", fd_events, str);
2626
#endif
2727
if (fd_events != -1) {
28-
write(fd_events, str, strlen(str)+1);
28+
write(fd_events, str, strlen(str) + 1);
2929
#ifdef DEBUG
3030
logf("write to fd_events = %d errno = %d", fd_events, errno);
3131
#endif
@@ -44,7 +44,7 @@ gchar * logstr(gchar *msg) /* TODO const */
4444
{
4545
size_t len;
4646

47-
g_printf("LOGF: %s",msg);
47+
g_printf("LOGF: %s", msg);
4848
len = strlen(msg);
4949
logs(msg, len);
5050

xmpp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gchar *escape(const gchar *src)
1717
{
1818
const gchar esc[] = "\bb\ff\nn\rr\tt\\\\\"\"";
1919
// maximum possible length of escaped string
20-
gchar *dest = g_malloc(strlen(src)*2+1);
20+
gchar *dest = g_malloc(strlen(src) * 2 + 1);
2121
const gchar *p = src;
2222
gchar *q = dest;
2323
const gchar *c;
@@ -35,16 +35,16 @@ gchar *escape(const gchar *src)
3535
*q++ = *p;
3636
p++;
3737
}
38-
*q=0;
38+
*q = 0;
3939
return g_realloc(dest, strlen(dest));
4040
}
4141

4242
gchar *get_resource(const gchar *jid)
4343
{
4444
gchar *res;
45-
res = strchr(jid,'/');
45+
res = strchr(jid, '/');
4646
if (res)
47-
return g_strdup(res+1);
47+
return g_strdup(res + 1);
4848
return NULL;
4949
}
5050

@@ -65,7 +65,7 @@ static gchar *get_nick(const gchar *jid)
6565
ch = strchr(jid, '@');
6666
if (!ch)
6767
return g_strdup(jid);
68-
return g_strndup(jid, ch-jid);
68+
return g_strndup(jid, ch - jid);
6969
}
7070

7171
int banmuc(const char *mucjid, const char *who)
@@ -483,7 +483,7 @@ void connection_close_cb(LmConnection *connection, LmDisconnectReason reason, gp
483483
// very stupid autoreconnect routine
484484
int delay;
485485
const char *delay_s;
486-
if ((delay_s = g_hash_table_lookup(config,"auto_reconnect")) && (reason != LM_DISCONNECT_REASON_OK)) {
486+
if ((delay_s = g_hash_table_lookup(config, "auto_reconnect")) && (reason != LM_DISCONNECT_REASON_OK)) {
487487
delay = atoi(delay_s);
488488
logs("Reconnecting in %ds\n", delay);
489489
sleep(delay);

0 commit comments

Comments
 (0)