int delete_user(const char *name, User **user_ptr_del) {
250     User *temp = *user_ptr_del;
251     if (strcmp((*user_ptr_del)->name, name) == 0){
252             for (int i = 0; i < MAX_FRIENDS; i++){
253                         for (int j = 0; j < MAX_FRIENDS; j++){
254                                 if (strcmp(((*user_ptr_del)->next->friends[i]->f    riends[j]->name), name)== 0){
255                                         (*user_ptr_del)->next->friends[i]->frien    ds[j] = (*user_ptr_del)->next->friends[i]->friends[j+1];
256                                 }
257                         }
258                 *user_ptr_del = temp;
259                 return 0;
260                 }
261            *user_ptr_del = (*user_ptr_del)->next;
262     } else {
263         while ((*user_ptr_del)->next != NULL){
264             if (strcmp((*user_ptr_del)->next->name, name) == 0){
265                 for (int i = 0; i < MAX_FRIENDS; i++){
266                         User *friend = (*user_ptr_del)->next->friends[i];
267                         for (int j = 0; j < MAX_FRIENDS; j++){
268                                 if (strcmp((friend->friends[j]->name), name)== 0    ){                                  
269                                         friend->friends[j] = friend->friends[j+1    ];                  
270                                 }
271                         }
272                 }
273                 (*user_ptr_del)->next = (*user_ptr_del)->next->next;
274                 (*user_ptr_del) = temp;
275                 return 0;
276             }
277         *user_ptr_del = (*user_ptr_del)->next;
278         }
279     }

  * From the list pointed to by *user_ptr_del, delete the user
242  * with the given name.
243  * Remove the deleted user from any lists of friends.
244  *
245  * Return:
246  *   - 0 on success.
247  *   - 1 if a user with this name does not exist.