mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
ignore another return value and move initial loop declaration outside of loop
This commit is contained in:
parent
ddd5ce857d
commit
8b9b06c24f
@ -804,7 +804,8 @@ writecsv(int fd, const char *const str){
|
|||||||
size_t len = strlen(str);
|
size_t len = strlen(str);
|
||||||
char *s = malloc(2 * len * sizeof(char));
|
char *s = malloc(2 * len * sizeof(char));
|
||||||
char *c = s;
|
char *c = s;
|
||||||
for(int i = 0; i < strlen(str); i++){
|
int i = 0;
|
||||||
|
for(; i < strlen(str); i++){
|
||||||
if(str[i] != '"') *c++ = str[i];
|
if(str[i] != '"') *c++ = str[i];
|
||||||
else { *c++ = '"'; *c++ = '"'; len++; }
|
else { *c++ = '"'; *c++ = '"'; len++; }
|
||||||
}
|
}
|
||||||
@ -827,8 +828,10 @@ cmd_export(ProfWin *window, const char *const command, gchar **args)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
int unused;
|
||||||
|
(void)(unused);
|
||||||
|
|
||||||
write(fd, "jid,name\n", strlen("jid,name\n"));
|
unused = write(fd, "jid,name\n", strlen("jid,name\n"));
|
||||||
list = roster_get_contacts(ROSTER_ORD_NAME, TRUE);
|
list = roster_get_contacts(ROSTER_ORD_NAME, TRUE);
|
||||||
if(list){
|
if(list){
|
||||||
GSList *curr = list;
|
GSList *curr = list;
|
||||||
@ -836,8 +839,6 @@ cmd_export(ProfWin *window, const char *const command, gchar **args)
|
|||||||
PContact contact = curr->data;
|
PContact contact = curr->data;
|
||||||
const char *jid = p_contact_barejid(contact);
|
const char *jid = p_contact_barejid(contact);
|
||||||
const char *name = p_contact_name(contact);
|
const char *name = p_contact_name(contact);
|
||||||
int unused;
|
|
||||||
(void)(unused);
|
|
||||||
|
|
||||||
/* write the data to the file */
|
/* write the data to the file */
|
||||||
unused = write(fd, "\"", 1);
|
unused = write(fd, "\"", 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user